How do i loop thru all dropdown boxes in JQuery?
something like this should do the trick
$("select").each(function() {
//do something with the select $(this) will give you the select element
});
$("select")
will include all the combo boxes too. To just get the drop down menus, use this:
$("select:not([size])")
To answer your other question:
How do I loop thru in multiple divs? Can I do
$('#mydivname').find('select').each(function(){ });
??
$('#mydivname select:not[size]').each(...)
精彩评论