Each (callback)
Executes a function in the context of each matched element.
This means that every time an incoming function is executed, the this keyword in the function points to a different DOM element (a different matching element every time). Moreover, every time a function is executed, a numerical value representing the position of an element as an execution environment in the matching element set is passed to the function as a parameter (zero-based shaping). Returning "false" will stop the loop (just like using "break" in a normal loop). Return "True" to jump to the next loop (just like using "Continue" in a normal loop).
Callback is a callback function, which indicates the operation that should be given when traversing the element. Let's look at the following simple example:
Iterate over two images and set their src properties. Note: This refers to the DOM object, not the jQuery object.