Jquery Iterating over list of jQuery elements
When you need to iterate over the list of jQuery elements.
Consider this DOM structure:
To print the text present in all the div elements with a class of red:
Tip: key is the index of the div.red element we're currently iterating over, within its parent. ele is the HTML element, so we can create a jQuery object from it using $() or jQuery(), like so: $(ele). After, we can call any jQuery method on the object, like css() or hide() etc. In this example, we just pull the text of the object.