isSet( $("#foo").children("[code]").get(), q("sndp", "sap"), "Check for filtered children" );\r
});\r
\r
+test("parent[s]([String])", function() {\r
+ ok( $("#groups").parent()[0].id == "ap", "Simple parent check" );\r
+ ok( $("#groups").parent("p")[0].id == "ap", "Filtered parent check" );\r
+ ok( $("#groups").parent("div").length == 0, "Filtered parent check, no match" );\r
+ \r
+ ok( $("#groups").parents()[0].id == "ap", "Simple parents check" );\r
+ ok( $("#groups").parents("p")[0].id == "ap", "Filtered parents check" );\r
+ ok( $("#groups").parents("div")[0].id == "main", "Filtered parents check2" );\r
+});\r
\r
test("show()", function() {\r
expect(1);\r
});\r
\r
test("toggleClass(String)", function() {\r
+ expect(3);\r
var e = $("#firstp");\r
ok( !e.is(".test"), "Assert class not present" );\r
e.toggleClass("test");\r
*/
jQuery.each({
parent: "a.parentNode",
- parents: jQuery.parents,
+ parents: "jQuery.parents(a)",
next: "jQuery.nth(a,1,'nextSibling')",
prev: "jQuery.nth(a,1,'previousSibling')",
siblings: "jQuery.sibling(a.parentNode.firstChild,a)",