Skip to main content

Bug Tracker

Side navigation

Ticket #6016: brendan.html
File brendan.html, 0.9 KB (added by brendo_, February 03, 2010 04:04AM UTC)

Test Case

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
	<script type="text/javascript">		
		$(document).ready(function() {
			var l = $('#not-working');
			
			var list = $('<ul><li>Hello</li></ul>');
			l.after(list);
			
			console.log(list.find('li'));			
			
			list.find('li').live('click', function() {
				console.log("I'm Clicked");				
			});
			
			$('#working').find('li').live('click', function() {
				console.log("Working Clicked");				
			});
		})	
	</script>
	
</head>

<body>	
	<div id='not-working'>Label</div>	
	
	<ul id='working'>
		<li>Working</li>
	</ul>
</body>
</html>

Download in other formats:

Original Format