or simply $('#slide-images li:gt(0)').hide();

Later on you can get the last one with $('#slide-images li:last') (or
last-child), or cache the collection.

On Dec 22, 8:25 pm, Dave Methvin <dave.meth...@gmail.com> wrote:
> Untested, but I think this does it:
>
> function init(){
>   LastPic = $('#slide-images li').slice(1).hide().length;
>
> }
>
> In jQuery there is probably a better way to do the rest of the code
> than using a global variable for LastPic, but it depends on what the
> rest of the code looks like.

Reply via email to