\r
test("slice()", function() {\r
expect(6);\r
- isSet( jQuery("#ap a").slice(1,2), q("groups"), "slice(1,2)" );\r
- isSet( jQuery("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" );\r
- isSet( jQuery("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );\r
- isSet( jQuery("#ap a").slice(-1), q("mark"), "slice(-1)" );\r
+ \r
+ var $links = jQuery("#ap a");\r
+ \r
+ isSet( $links.slice(1,2), q("groups"), "slice(1,2)" );\r
+ isSet( $links.slice(1), q("groups", "anchor1", "mark"), "slice(1)" );\r
+ isSet( $links.slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );\r
+ isSet( $links.slice(-1), q("mark"), "slice(-1)" );\r
\r
- isSet( jQuery("#ap a").eq(1), q("groups"), "eq(1)" );\r
+ isSet( $links.eq(1), q("groups"), "eq(1)" );\r
\r
- isSet( jQuery("#ap a").eq('1'), q("groups"), "eq('1')" );\r
+ isSet( $links.eq('2'), q("anchor1"), "eq('2')" );\r
});\r
\r
test("map()", function() {\r