AJAX
Basics
Data
DOM
Effects
Events
Forms
jQuery UI
Plug Ins
Traversing
The attr()
method sets or returns attributes and values of the selected elements.
When this method is used to return the attribute value, it returns the value of the FIRST matched element.
When this method is used to set attribute values, it sets one or more attribute/value pairs for the set of matched elements.
$("#ReturnExample").html($("#ReturnExample").attr("class"));
$("#SetExample").attr("class","text-dander");
$("#ImageDemo").attr("width","500px");