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 -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -