internet explorer - jQuery:IE only, input:checked returns 0 even when items selected -
I'm seeing an error, I can not repeat users with a small subset of the code here:
var selected = $ ('# mytable input: check'); If (selected.length == 0) {$ ('body'). Triggers ('notice', 'please select some items first'); Return; }
Even when the user checks several checkboxes, then "notice" triggers seems to have been selected. This should not be length when the length is zero. The [UPDATE] selector works when it is updated:
var selected = $ ('input [class = "selection"]: ' check ');
It seems that the ID in the selector breaks only on IE.
This code is working for the vast majority of users and we repeat the problem, but the problem that is seen for users is consistent and every time it happens.
This IE is being isolated (though I can not believe it). We are using jQuery 1.3.2 (from Google CDN).
Any thoughts?
It would be a good idea to paste the surrounding code / event handler (paste) For this, I would suggest using the selector in my first line:
$ ('# mytable input: checkbox: check')
manual Say:
$ (': checkbox')
is equal to$ ('*: checkbox')
, hence the$ ('Input: Checkbox')
should be used instead
Of course, it will not make any difference to : checkbox
is equal to $ ('[type = checkbox]')
, so it Maybe Maybe Input: a part of your selector >
check all input for the state Testing the elements.
Comments
Post a Comment