Please disable Adblock!

Remove events with jquery or javascript

This is the function that we have bound it as below:

$(function(){ 
    //remove click doSomething
    $("div").click(doSomething1); 
}); 

 In jQuery we can do add and remove events as we go along, there are two way that we can remove or unbind event of jQuery

$('div').off('click', doSomething); 
 
// or 
 
$('div').unbind('click', doSomething); 

 if is there any batter way then caould yo ucomment down below please,

I hope this would help.

Thanks

3 comments on “Remove events with jquery or javascript”

  1. Gravatar of rolex replica watches  rolex replica watches
    Posted Monday, December 3, 2012 at 11:45:13 PM

    In jQuery we can do add and remove events as we go along, there are two way that we can remove or unbind event of jQuery

  2. Gravatar of LED G24 PLC Lights  LED G24 PLC Lights
    Posted Thursday, October 10, 2013 at 4:28:29 AM

    We’ve known all along that the decision to convert to LED lighting is intelligent; it’s exciting to see these lamps in themselves have become “intelligent lighting.”

  3. Gravatar of cheap essay writing service  cheap essay writing service
    Posted Thursday, April 26, 2018 at 11:29:31 PM

    Well, it is very nice if you do share stuff like this but there is much more than you can do here, we are now working on same subject right for the moment because online essay review would give you an idea how to make your work more elegant and professional, we have been working on this niche for the last couple of years and we hope fresh content can help you to improve your ranking. I not only appreciate this post, but I give unlimited thumb ups to your blog as every student can find help from this blog. I recommend this blog to all the students specially looking for the Psychology programs. If you are looking for the https://essayservices.org/ it would also be a good blog. Thanks for sharing such interesting and informative article. I really appreciate your work, Keep it up and you will be very successful in future.

Post a comment