- ok( $("#ap a").gt(1).get(), q("groups", "anchor1", "mark"), "gt()" );\r
- ok( $("#ap a").lt(2).get(), q("google", "groups", "anchor1"), "lt()" );\r
- ok( $("#foo a").contains("log").get(), q("anchor2", "simon"), "contains()" );\r
+ isSet( $("#ap a").gt(0).get(), q("groups", "anchor1", "mark"), "gt()" );\r
+ isSet( $("#ap a").lt(3).get(), q("google", "groups", "anchor1"), "lt()" );\r
+ isSet( $("#foo a").contains("log").get(), q("anchor2", "simon"), "contains()" );\r
+});\r
+\r
+test("click() context", function() {\r
+ $('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() {\r
+ var close = $('spanx', this); // same with $(this).find('span');\r
+ ok( close.length == 0, "Element does not exist, length must be zero" );\r
+ ok( !close[0], "Element does not exist, direct access to element must return undefined" );\r
+ //console.log( close[0]); // it's the <a> and not a <span> element\r
+ return false;\r
+ }).click();\r