Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery add multiple attribute to element by class

$(myObj).attr({"data-test-1": num1, "data-test-2": num2});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #add #multiple #attribute #element #class
ADD COMMENT
Topic
Name
8+1 =