jquery add multiple attributes code example
Example 1: jquery attr multiple attributes
.attr({
target:"nw",
title:"Opens in a new window",
"data-value":"internal link" // attributes which contain dash(-) should be covered in quotes.
});
Example 2: jquery add multiple attribute to element by class
$(myObj).attr({"data-test-1": num1, "data-test-2": num2});