jquery give id code example
Example 1: add id jquery
$('element').attr('id', 'value');
Example 2: how to add id in jquery
$( ".container" ).append( $( "h2" ) );
$('element').attr('id', 'value');
$( ".container" ).append( $( "h2" ) );