Using jquery, how can I iterate through all elements in a given class?
+2
A:
Using the each method.
$('.klass').each( function() {
$(this)... // will be an instance of the element matching the class selector
});
tvanfosson
2010-08-12 20:57:52
+1
A:
When in doubt, look at the documentation: http://api.jquery.com/each/
kevinmajor1
2010-08-12 20:58:41