Difference between revisions of "Jquery element querys"
From John Freier
Line 7: | Line 7: | ||
Not - When getting a group of items, this will exclude certain ones. | Not - When getting a group of items, this will exclude certain ones. | ||
$('.clazz1').not('.clazz2').click(function(){}); | $('.clazz1').not('.clazz2').click(function(){}); | ||
+ | |||
+ | Loop Through | ||
+ | $('#formid [type="checkbox"]').each(function(){ | ||
+ | $(this).val(); | ||
+ | } |
Revision as of 09:52, 26 September 2011
These are different ways in JQuery to query for the element(s).
Check boxes
$('[type="checkbox"]').click(function(){});
Not - When getting a group of items, this will exclude certain ones.
$('.clazz1').not('.clazz2').click(function(){});
Loop Through
$('#formid [type="checkbox"]').each(function(){ $(this).val(); }