Posted On: Feb 22, 2018
Chaining in jQuery lets you run multiple statements one after another on the same element. To chain multiple commands, append each jQuery command to the previous one using dot(.). Chaining allows you not to use one selector more than once for performing an action as all the actions are performed at once. It speeds up the time taken to execute the code as the compiler need not call a selector more than one time.
In the above statement, the color, slideup, and slidedown action are applied on the heading selector in the same line using chaining.
Never Miss an Articles from us.