Timeline for Check if checkbox is checked with jQuery
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 16, 2023 at 15:59 | comment | added | lisandro | $('#checkArray').checked in chrome is giving "undefined" while document.getElementById('checkArray').checked gives true or false. | |
Jun 26, 2020 at 6:44 | comment | added | dapidmini |
@AlejandroQuiroz I used to not omit the double quotes in jquery selector too. but recently I think it's quite useful because it improves code readibility and to avoid errors when the name or class contains a minus - sign
|
|
Oct 20, 2016 at 1:44 | comment | added | Oddman | @DanWilliams yes but not in the example mmcrae gave. | |
Sep 1, 2016 at 15:18 | comment | added | Dan Williams | @Oddman it does work, just not on a jquery object. instead of $(elem).checked, try elem.checked. | |
S Dec 31, 2015 at 8:41 | history | suggested | depankur rawat | CC BY-SA 3.0 |
Please don't add spaces between selectors and id/class.
|
Dec 31, 2015 at 7:52 | review | Suggested edits | |||
S Dec 31, 2015 at 8:41 | |||||
Oct 27, 2015 at 14:46 | comment | added | Don Cheadle |
Why use $('#checkArray :checkbox:checked').length > 0; when the more simple $('#checkArray').checked works and is available on more versions?
|
|
Jun 28, 2013 at 0:00 | review | Suggested edits | |||
Jun 28, 2013 at 0:02 | |||||
Feb 5, 2010 at 0:38 | vote | accept | Jake | ||
Feb 5, 2010 at 0:31 | history | answered | nickf | CC BY-SA 2.5 |