I can't find this anywhere, how do you check to see if slice is returning elements still in the list? Like `$('.class').slice(n-th,n-th);`

When n-th variables are increased throughout the index of the return class by slicing, how do you know when slice returns on an invalid index? Hope I explained that well.

Here is the example code of what I'm trying to accomplish:

```
$(window).scroll(function() {
    if(!($('embed').slice(p1,p2).show())){
        $(window).unbind('scroll');
    }
    ++p1;++p2;
}

```

Also, why is my event not unbinding? 

Thanks for any assistance :)