jQuery add() Method

jQuery add Method : Adds elements to the matched elements.

Syntax of jQuery Traversing – add() Method


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

<script type="text/javascript">
             $("div").add(" p ").css("background","yellow");           

Try it »

Add Comment

📖 Read More