7

I have the following code

http://www.jsfiddle.net/uZc8w/

what i'm simply wondering is how would i with jquery/javascript remove that attr so it wouldnt work anymore

Breezer
  • 9,844
  • 6
  • 27
  • 47
  • use this [link](http://stackoverflow.com/questions/209029/best-way-to-remove-an-event-handler-in-jquery) may be its hepful for you. – Sandeep Apr 08 '13 at 07:34

1 Answers1

13

See removeAttr.

Updated demo

redsquare
  • 75,782
  • 18
  • 147
  • 156
  • 3
    how come unbind or the solution i posted there doesn't work but removeAttr does ? – Breezer Dec 05 '10 at 14:53
  • 1
    because jquery did not attach the event so it cannot unbind it. – redsquare Dec 05 '10 at 16:42
  • 1
    @Breezer: and instead of bin/unbind use on/off. For With jQuery 1.7 onward the event API has been updated, .bind()/.unbind() are still available for backwards compatibility, but the preferred method is using the on()/off() functions. – Tom Sarduy Nov 24 '12 at 08:48