When JQuery binded or lived events are triggered multiple times

For a code piece like this:

var clicked = function(){

The "clicked" function could be triggered multiple times in certain circumstance, on which I haven't research further yet.
But one solution to this is to remove the binded event before binding/live it, sth like:




I have tried both of those two lines of code and it works fine. The only difference is to remove a "bind-ed" event, "unbind" is the function. While for the "live" event, it's the function of name "die".

Of course it's similar to other event like "onchange",just make sure the "onchange event" died before make it live (again):

var changed= function(){




Thanks a lot! You saved me a headache

Add new comment