I found sometimes I hook up 2 functions to the buttun, using .click(function(){}), is it possible for me to remove the prior attached function before I hook up new one?
Not using an anonymous delegate like that. You can .unbind a named function though.
UPDATE
Actually you can call .unbind() with no arguments to remove all handlers or .unbind('click') to remove all handlers for a particular event.
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