Tag Archives: jquery tutorial with examples for beginners

jQuery addBack() Method


jQuery addBack() Method Adds the previous set of elements to the current set.


Syntax of jQuery Traversing – addBack() Method

$(selector).addBack([selector element]);

jQuery addBack() Method – Example


Try it »

jQuery add() Method


jQuery add Method : Adds elements to the matched elements.


Syntax of jQuery Traversing – add() Method

$(selector).add(element,context);

Parameters :
element : One or more elements to be added in the matching selections.
context : Is optional. It is point of document from where selector should begin the matching.

jQuery add Method Example with syntax


Try it »

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 Div
Second Div
Third Div

jQuery selector chaining example


    

Try it »

jQuery selector chaining example


$(“selector1,selector2,selector3, selector4….”).method() is used for jQuery selector chaining.


jQuery selector chaining example and code

jQuery selector chaining example


    

Try it »

jQuery Chaining


In jQuery you can link more then one jquery actions together.


jQuery Chaining Example And Code

jQuery Chaining Example


    

Try it »

Some Important Points about jQuery chaining :

  • It Improves Performance
  • Method called in sqquence of right to left ie. method added first will be called first and method added in last will be called in last.
    In the above example first .animate(),.css() and then slideUp() is called

jQuery Chaining Most Used Examples

[table width=”100%” colwidth=”20|190|50″ colalign=”left|left|center|left|right”]
No, Slide Animate Effect ,Syntax, Example & Demo
1, jQuery selector chaining example,$(“selector1\,selector2\,selector3\, selector4….”).method();, Example And Demo
2, jQuery chaining animations,—–, Example And Demo
[/table]

jQuery animate background color milliseconds


jQuery animate({background:’yellow’,1000},) will add background color Milliseconds animation effect.


jQuery animate background color milliseconds Example And Code

jQuery animate background color milliseconds Example with syntax


    

Try it »

jQuery animate background color fast


jQuery animate({background:’yellow’},”fast”) will add background color fast animation effect.


jQuery animate background color fast Example And Code

jQuery animate background color fast Example


    

Try it »

jQuery animate background color


jQuery animate({background:’yellow’}) will add background color animation effect.


jQuery animate background color Example And Code

jQuery animate background color Example


    

Try it »