Mike,
I figured out a solution. I just needed to create the proper scope to
index in.
index = $(".spot div").index(this); where ".spot" is a container for
the slides and each slide is in a div.
Thanks.
Oops, sorry about that. Try this inside the 'before' callback:
var index = $(this).parent().children().index(this);
Mike
On Jan 8, 2008 2:49 PM, kwsath <[EMAIL PROTECTED]> wrote:
>
>
> > The Cycle Plugin does this for you. The active pager element will
> > have an "activeSlide" class assigne
> The Cycle Plugin does this for you. The active pager element will
> have an "activeSlide" class assigned to it. If you want to roll your
> own then you can get the index like this:
>
> function onBefore() {
> var index = $(this).index();
> // update controls...
>
> }
>
> Mike
Thanks
> I'm working on a "before" callback function and I'd like to access the
> current slide index. I'd like to know what slide "number" is coming
> up. As the new slide is called, I want to add a class to the
> corresponding pager element so it appears "active." Make sense?
The Cycle Plugin does thi
4 matches
Mail list logo