Yeah that one-liner is sweet. I guess I was thinking too much about a
selector. The project I need this for does run an older jQuery version
and the deadline is preparing to make this ugly ugly sound that you get
when not only upsetting the client but also ruining his business - so
updating, hoping none of the virtually several hundred JS enhanced pages
won't break is not in reach right now ; ).
Anyway, thanks for the tip I'll keep it in mind : ).
-- Felix
--------------------------
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
John Resig wrote:
Here's a one-liner:
$('table tr').slice(1,-3);
--John
On 8/29/07, Joel Birch <[EMAIL PROTECTED]> wrote:
Hi Felix,
As of jQuery 1.1.4 there is a new slice() method which works similar to the
JavaScript native Array.slice() method, except on jQuery objects. Therefore,
I guess you could do something like:
var $rows = $('table tr');
$rows.slice(1,$rows.length-3);
I may not have calculated the slice parameters properly because I wanted to
post this quick enough to beat Karl to the punch :)
Joel Birch.