Tag Archives: learn jquery online
jQuery parents Method
jQuery “parents() Method ” is used to get all ancestors of the selected element.
Syntax : jQuery parents() method
$(selector).parents(filter);
filter : It is optional, A selector expression used to match(parent) the elements against.
jQuery parents Method Example
jQuery offsetParent Method
jQuery “offsetParent()” is used to get the closest ancestor element from set of the matched elements.
Syntax : jQuery offsetParent method
$(selector).offsetParent();
Note : It Accepts no parameter.
jQuery offsetParent() Method with demo Example
jQuery nextAll method
jQuery “nextAll()” method is used to get all the next siblings of the matched elements.
Syntax : jQuery nextAll() method
$(selector).nextAll(selector-element);
selector-element : Is optional, you can add selector-element to get next element.
jQuery nextAll Method Example 1
jQuery nextAll Method Example 2
jQuery first method
jQuery first method() is used to get the first element of the selected element.
Syntax : jQuery first method
$(selector).first();
Note : It accepts no arguments.
jQuery first method Example
jQuery children() Method
Get all the elements of the selected element.
Syntax : jQuery Traversing – children() Method
$(selector).children([selector element]);
[selector element] String containing the selector expression for matching the elements.
jQuery Traversing – children() Example 1
jQuery Traversing – children() Example 2
jQuery Traversing
jQuery traversing : jQuery Traversing stands traverse the Html DOM based on the element’s relationship. jQuery Traversing is used to filter the html elements based on the element’s relationship with the other elements.
Basic Example Of jQuery Traversing
Lets Start with very basic example.
jQuery chaining animations
jQuery chaining animations is explained with example and demo.
jQuery chaining animations example and code
In the example we going to add chaining animations in the divs
First DivSecond DivThird DivjQuery selector chaining example
$(“selector1,selector2,selector3, selector4….”).method() is used for jQuery selector chaining.
jQuery selector chaining example and code