how to give id and class in jquery code example
Example 1: add id jquery
$('element').attr('id', 'value');
Example 2: how to add id in jquery
var pdiv = $( "p" );
pdiv.add( "div" ); // WRONG, pdiv will not change
$('element').attr('id', 'value');
var pdiv = $( "p" );
pdiv.add( "div" ); // WRONG, pdiv will not change