in this rule:
if($('fieldset[data-input-type=checkbox]').find('input').is(':checked'))
{
alert($(this));
}
why do I get “object Object” as an alert and not the fieldset? How would I do a specific action for each fieldset with a checked input in it and not all of them?
This should do it
demo http://jsfiddle.net/gaby/hVTBF/
or if you indeed have to filter only to
fieldsetthat have the attributedata-input-typethen useUpdate after comment
Since you just want to run more jQuery methods on the objects you can directly do that in your initial selector and avoid the
eachwhich runs a function for each item.and