Example of .die() in jQuery

May 02, 2013
.die() in jQuery kills the event on any element. Once the .die() function kills the event, then that event will not work on the calling event. After calling .live(), that event will start working. Syntax is
1.	.die()
2.	.die(event name)
First one will kill the entire event and second one will kill event wise. Find the example.

<!DOCTYPE html>
<style>p { color:blue; cursor:pointer } </style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<p>Click to test Die</p>
$("p").text( "Now click will not work." );
 $("p").die( "click" );



©2023 concretepage.com | Privacy Policy | Contact Us