rem: test("click()", function() { expect(4); $('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() { var close = $('spanx', this); ok( close.length == 0, "Context element does not exist, length must be zero" ); ok( !close[0], "Context element does not exist, direct access to element must return undefined" ); return false; }).click();  $("#check1").click(function() { ok( true, "click event handler for checkbox gets fired twice, see #815" ); }).click();  var counter = 0; $('#firstp')[0].onclick = function(event) { counter++; }; $('#firstp').click(); ok( counter == 1, "Check that click, triggers onclick event handler also" ); }); 
add: $("<a href='#fail' class='test'>test</a>").click(function(){ return false; }).appendTo("p"); 
context: test("click()", function() {	expect(4);	$('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() {		var close = $('spanx', this); // same with $(this).find('span');		ok( close.length == 0, "Context element does not exist, length must be zero" );		ok( !close[0], "Context element does not exist, direct access to element must return undefined" );		return false;	}).click();		$("#check1").click(function() {		ok( true, "click event handler for checkbox gets fired twice, see #815" );	}).click();		var counter = 0;	$('#firstp')[0].onclick = function(event) {		counter++;	};	$('#firstp').click();	ok( counter == 1, "Check that click, triggers onclick event handler also" );});
meta: 2798	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2798/3261544c38ca70cc02c5eed7d0ab2c40c521a588/event.js/buggy/test/unit/event.js