jQuery add and remove element attributes


Get the value of the first matching element, such as $ ("img").attr("src")

$("element").attr({key: value, key, value, ....})

Indicates that multiple attributes are set at once for an element

$("element").attr(key, value)

Sets an attribute for an element

$("element").attr(key, function)

Sets a functional attribute value.


Removes an attribute

Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.