Remove simple attribute with attr()


Remove simple attribute with removeAttr() method


$("#t2").click(function() { $(this).removeAttr("class") });
Well, this code has no problem except under IE


this code seems to be the solution using attr("class", "")


Remove the same attribute with attr() method


$("#t3").click(function() { $(this).attr("class", "") });


If you want to see the demo just visit this site jQuery removeAttr() method bug under IE

0 comments:

Post a Comment