mac firefox 3.6.13 firebug gives me this error: "removeAttribute is not a function" I have read somewhere that "removeAttribute" is buggy in some browsers however I need to use it. If it is a browser problem can anyone suggest a different method.
function closeThumbView(){
$("#thumbReelBox").fadeOut(1000, function(){
$("#thumbReelList > li > a, #thumbReelList > li, #thumbReelNav, #thumbReelBox").removeAttribute('style');
});
}
removeAttribute is a JavaScript DOM function. Since you are using $(), and thus operating on a jQuery object, you need to use the jQuery equivalent, removeAttr()
Try to use DOM element removeAttribute() method:
function closeThumbView(){
$("#thumbReelBox").fadeOut(1000, function(){
els = $("#thumbReelList > li > a, #thumbReelList > li, #thumbReelNav, #thumbReelBox");
for(ind=0;ind<els.length;ind++){
els[ind].removeAttribute('style');
}
});
}
or if you want to use JQuery method, use removeAttr() as one of the respondents said:
function closeThumbView(){
$("#thumbReelBox").fadeOut(1000, function(){
els = $("#thumbReelList > li > a, #thumbReelList > li, #thumbReelNav, #thumbReelBox");
els.removeAttr('style');
});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With