How to use undelegate() Method Event in JQuery

This article describe about undelegate() Method Event in jQuery.
  • 2340

undelegate() Method Event in jQuery

With the delegate() method add one or more event handler remove by the undelegate() method.




Parameter Description
selector Optional. Define selector to remove event handler
event Optional. Define one or more type event handler to remove from.
function Optional. Define specific event handler to remove.


<!DOCTYPE html>



<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("body").delegate("p", "click", function () {



        $("button").click(function () {







<p>This is me first paragraph.</p>

<p>This is second paragraph.</p>

<p>Click on ane paragraph p element to make it disappear. Including this one also.</p>

<button>Remove event handlers, added with the delegate() method, from all elements</button>






undelegate method pic6.jpg


You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.