Posted On: Feb 22, 2018
The $.each() method is used to iterate over all the DOM elements in the jQuery object and executes a function for each matched element. This method is used in manipulating multi-element DOM.
Example
const arr = [ 'one','two'] $.each(arr, function(index, value) { console.log(value); });
The above function prints the element of the array as mentioned in the function of the $.each method.
Never Miss an Articles from us.
jQuery is a lightweight JavaScript library which gives a quick and simple method for HTML DOM traversing and manipulati..
There are many advantages of JQuery. Some of them are :It is more like a JavaScript enhancement so there is no overhea..
There are 3 types of selectors in JqueryCSS Selector XPath Selector Custom Selector..