Tag Archives: next element child
July 2, 2015
Jquery Blog
jQuery next method
jQuery next method : jQuery “next()” is used to get the next siblings of the matched elements. $(selector).next(selector-element); is method to get next element. Where selector and selector-element are input parameters.
jQuery next() method Syntax
$(selector).next(selector-element);
selector-element : Is optional, you can add selector-element to get next element.
jQuery next Method Example 1
Here is an example of next() method which selects next elements to the the class .curr-li and adds css ie. border red.
The ouput of the above code is :