tags:

views:

16

answers:

2

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
+1  A: 

When in doubt, look at the documentation: http://api.jquery.com/each/

kevinmajor1