[jQuery] Re: Just discovered something

2009-10-29 Thread dabear
Do is a reserved identifier. The same goes for while, if, etc. If you must use those keys, surround them in strings: data:{ "do": "se-min-kuk" } On 29 Okt, 11:53, lionel28 wrote: > I am sure most of you guys already know it, but I just found out that IE does > not like the word "do" > > I was doi

[jQuery] Re: find reverse

2009-05-27 Thread dabear
The closest()-method (available since jquery 1.3) would be ideal here, as it stops searching when an element matching the expression is found. See also: http://docs.jquery.com/Traversing/closest Please also note that ids are unique within a document, so just $ ("#test0") should be fast enough. O

[jQuery] Re: checkbox array

2009-03-03 Thread dabear
If you really need those brackets, just escape them with two backslashes: $('input[name=foo\\[\\]]:checked').length If you need them as a post query, just use : var $foos = $('input[name=foo\\[\\]]:checked'); var postQuery = $.param($foos); On Mar 2, 6:08 am, mklebel wrote: > Been losing my

[jQuery] Re: Selecting an element whose ID is in a variable

2008-10-28 Thread dabear
In this case you might use that solution (if you can gurantee the id won't mess with the selctor), but I would usually just do a $(document.getElementById(var)); that way you don't have to escape "var". imagine you had a then var id=theDiv.attr("id") // id would now be "foo :first-child" so no

[jQuery] Re: How to retrieve jQuery.query?

2008-08-31 Thread dabear
Not sure if I answer your question completly, but doing that test on each elements tagName should do it Tzury skrev: > Say a user called $('div.foo') I would like to get this 'div.foo' from > within my plug-in context. > > I look through the code and couldn't find a property which contain > this