jQuery attr()
The jQuery attr() method sets or returns the value of a property of selected elements. Syntax: When used to return an attribute’s value: $(selector).attr(attribute) When used to set an attribute and value: $(selector).attr(attribute,value) When used to set an attribute and value by using a function: $(selector).attr(attribute,function(index,currentvalue)) When used to set multiple attributes and values: $(selector).attr({attribute:value, … Read more