Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to add attribute in a element

var e = $('<div style="display:block; float:left;"></div>');

e.attr('id', 'myid');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #add #attribute #element
ADD COMMENT
Topic
Name
5+9 =