Friday, 27 September 2013

checkbox state and other attributes

checkbox state and other attributes

What would be the best way to get the checked or unchecked state of a
checkbox + any other relevant data like data-id etc
So far I have
$(".checkbox").each(function(){
var $checked = $(":checked");
});
I have a var checkbox that is set as an array. My ideal result would be
data-id state

No comments:

Post a Comment