change attribute value jquery code example
Example 1: jquery attr multiple attributes
.attr({
target:"nw",
title:"Opens in a new window",
"data-value":"internal link"
});
Example 2: get attribute value jquery
var some_var = $( some_jquery_selector ).attr( 'some_attribute_name' );
Example 3: jquery set att
$input.attr("attributeName", "attributeValue");
Example 4: jquery attr
$( some_item ).attr( "id", "some-id" );
$( some_item ).attr({
id: "some-id",
title: "Opens in a new window",
"data-value": "internal link"
});