jquery add id is old code example
Example 1: how to add id in jquery
$( "li" ).add( "p" ).css( "background-color", "red" );
Example 2: how to add id in jquery
$( ".inner" ).append( "<p>Test</p>" );
$( "li" ).add( "p" ).css( "background-color", "red" );
$( ".inner" ).append( "<p>Test</p>" );