Bug Tracker

Ticket #4317: index.html

File index.html, 834 bytes (added by georgious, 13 years ago)

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

Line 
1<html>
2<head>
3<title>Testing die() and live() methods</title>
4</head>
5<body>
6Click on the first element - you should just get a message that everything is ok. <br />
7<a href="some-other-file.html">Some element</a>
8
9<p>
10Ok, click on the button now - it should remove the event *only* from the second element.
11</p>
12
13<div class="someClass">
14<a href="#">Some other element</a>
15</div>
16<br />
17<input class="button" type="submit" value="Crash it!" />
18
19<script type="text/javascript" src="jquery.min.js"></script>
20<script type="text/javascript">
21$( function(){
22  $('a').live('click', function(){
23    alert('aye-aye! Everything works fine!');
24    return false;
25  });
26
27  $('.button').click( function(){
28    $('.someClass a').die('click');
29    alert('OK, click ont he first element now...');
30    return false;
31  });
32});
33</script>
34</body>
35</html>