Sniper attr()
The SniperJS attr() method is used to set or return attributes and values of the selected elements.
$(selector).attr(attribute) $("button").click(function(){
$("img").attr("src");
});$(selector).attr(attribute,value) $("button").click(function(){
$("img").attr("width", "500");
});Parameters of SniperJS attr() method
Parameter
Description
Last updated