I forget offhand.
views:
82answers:
5
+1
A:
$("div.someClass:not(div.someClass:first)")
Assuming of course you are looking for div.someClass. This might be a bit verbose, but I think it works. Haven't tested.
Jeff Meatball Yang
2009-07-01 04:07:15
+4
A:
You can do:
$(selector).not(':first');
Or:
$('selector:not(:first)');
Paolo Bergantino
2009-07-01 04:07:31
Oh okay. I was thinking I recalled the .not function as inverting the selection or something... :P
Daddy Warbox
2009-07-01 04:11:24
+1
A:
Another option is the gt
selector (greater than):
$('selector:gt(0)');
or
$('selector').gt(0);
:not(:first)
is more readable, but also a bit longer.
Kobi
2009-07-01 05:07:13
+1
A:
You could also use the splice method, e.g.
var nodes = $(selector);
nodes.splice(0, 1);
wrumsby
2009-07-01 05:21:05