rem: $('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() { var close = $('spanx', this); ok( close.length == 0, "Element does not exist, length must be zero" ); ok( !close[0], "Element does not exist, direct access to element must return undefined" );  return false; }).click(); 
add: test("empty()", function() { ok( $("#ap").children().empty().text().length == 0, "Check text is removed" ); ok( $("#ap").children().length == 4, "Check elements are not removed" ); }); 
context: 	$('<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, "Element does not exist, length must be zero" );	    ok( !close[0], "Element does not exist, direct access to element must return undefined" );	    //console.log( close[0]); // it's the <a> and not a <span> element	    return false;	}).click();
meta: 1471	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1471/7d0a84193f539d85267d1458aba35a42d7dbd03b/coreTest.js/clean/src/jquery/coreTest.js