jQuery Chaining – jQuery

title: jQuery Chaining

jQuery Chaining

jQuery chaining allows you to execute multiple methods on the same jQuery selection, all on a single line.

Chaining allows us to turn multi-line statements:

$('#someElement').removeClass('classA'); $('#someElement').addClass('classB');

Into a single statement:


More Information:

For more information, please visit the w3schools documentation.

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.