I'm not sure if this is a bug or just some crazy new thing in jQuery 1.3 that I'm unaware of, or if I've just gone crazy.
I have a table with 11 checkboxes in it, and I can't select them all using jQuery 1.3:
// jQuery 1.2.6
$(".myTable").find(":checkbox"); // finds 11 elements
// jQuery 1.3
$(".myTable").find(":checkbox"); // finds 1 element: the first checkbox
$(":checkbox", $(".myTable")); // finds 1 element
$('.myTable :checkbox')); // finds all 11 elements
The results are the same if I use .find('*')
: it only picks the first element in 1.3, so it's nothing peculiar to :checkbox
.
On my own page, I can recreate this every time, but when I paste the (seemingly) relevant parts into JSBin, it works!
The original page also has Mootools included, but I've been very careful with scoping and there weren't any issues with jQ 1.2.6, so I don't think that could be it. Any other ideas?
And before anyone says it, using the .find()
function is very much more convenient than the combined selector (".myTable :checkbox"
) in this case, and changing all my code to that style isn't an option!