jquery - selecting checkboxes as a group -


i use code below loop through checkboxes. works, it's getting every single checkbox on page. there way select group of checkboxes share same name, class, or exist in same div container?

thanks

 $('input[type=checkbox]').each(function () {  ...do stuff 

filtering name :

$('input[type=checkbox][name=yourname]') 

or

$('input[type=checkbox]').filter('[name=yourname]') 

filtering class

$('input[type=checkbox]').filter('.myclass') 

filtering parent :

$('input[type=checkbox]', parent) 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

monitor web browser programmatically in Android? -

c# - Using multiple datasets in RDLC -