Chrome Extension

.each() jQuery

var all_divs = $("div");

all_divs.each(function(index, item) {
   //DO SOMETHING HERE
})
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

.each() function in jQuery is used for looping through elements. In the code snippet, we have selected all 'div' elements which must be existed on the webpage. .each() function can be used here to manipulate all div elements.

Was this helpful?
0 Comments
Join Devsheet Ask a Question