Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

foreach selector in jquery

Use each: 'i' is the postion in the array, obj is the DOM object that you are iterating (can be accessed through the jQuery wrapper $(this) as well).

$('selector').each(function(i, obj) {
    //test
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #foreach #selector #jquery
ADD COMMENT
Topic
Name
7+9 =