To read or change element attributes, use the attr()
function. removeAttr()
can be used
to remove attributes
attr()
: get the value of an attributeattr(name, val)
: set the name attribute to valattr({ name: val ... })
: set multiple attributes in one callremoveAttr(name)
: remove the attribute from the element