Faster Checked State jQuery

May 21st, 2012

http://jsperf.com/prop-vs-ischecked/4
Fastest by 98% is $el[0].checked; (in Chrome on Windows)

[code]// These will return true or false depending on the checked state of the HTML element
$(‘:checkbox[name=someCheckbox]’)[0].checked
$(‘:radio[name=someRadio]’)[0].checked[/code]

WordPress - Entries (RSS) and Comments (RSS) - © 2011 Ben Dauphinee