Skip to main content

Bug Tracker

Side navigation

Ticket #4317: index.html

File index.html, 0.8 KB (added by georgious, March 09, 2009 07:24PM UTC)

Simple html - jquery.min.js is not included, just add it next to the file.

<title>Testing die() and live() methods</title>
Click on the first element - you should just get a message that everything is ok. <br />
<a href="some-other-file.html">Some element</a>

Ok, click on the button now - it should remove the event *only* from the second element.

<div class="someClass">
<a href="#">Some other element</a>
<br />
<input class="button" type="submit" value="Crash it!" />

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
$( function(){
  $('a').live('click', function(){
    alert('aye-aye! Everything works fine!');
    return false;

  $('.button').click( function(){
    $('.someClass a').die('click');
    alert('OK, click ont he first element now...');
    return false;

Download in other formats:

Original Format