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

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -