<!DOCTYPE html>
<html>
<head>
<script src="/lib/jquery-1.12.2.min.js"></script>
<script>
$(document).ready(function(){
    $("body").delegate("p", "click", function(){
        $(this).slideToggle();
    });
    $("button").click(function(){
        $("body").undelegate();
    });
});
</script>
</head>
<body>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<p>Click any p element to make it disappear.</p>

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

</body>
</html>