jQuery add and remove element attributes


$("element").attr(name)

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.

$("element").removeAttr(name)

Removes an attribute




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook