selected class use to change the value of attr 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 get name attribute
$( "input[name='Hot Fuzz']" );