.add() in jQuery

It helps to Add an element to a selected element.

.add()

// To add “p” tag and change its background color to green.

$( “li” ).add( “p” ).css( “background-color”, “green” );