Inside my callback function I used this to get the current slide index
with my Cycle object:

$("myCycler").children().index(this);

When I used incoming to find the index, it remained the same until the
second click (third image/slide)

On Oct 21, 8:17 am, Tobias Parent <[EMAIL PROTECTED]> wrote:
> Never mind, I answered my own question. For those who may need to know,
> you can use the index() call, so long as you provide a context. For example:
>
> var myPlayerWindow = $("#my-player-window");
> myPlayerWindow.cycle({after: afterSwitch});
>
> function afterSwitch(incoming, outgoing, options) {
>     $.debug(myPlayerWindow.children().index(incoming) );
>
>     // or, in my case...
>     $("#slide-position").html(myPlayerWindow.children().index(incoming)+1);
>
> }
>
> Hope this helps someone else down the line!
>
>  -Toby
>   AIM: tobyParent
>   [EMAIL PROTECTED]
>
>
>
> [ Attached Message ]From:Tobias Parent <[EMAIL PROTECTED]>To:jQuery Google 
> Group <jquery-en@googlegroups.com>Date:Sun, 21 Oct 2007 11:45:26 
> -0400Local:Sun, Oct 21 2007 7:45 amSubject:[jQuery] Can the cycle plugin 
> return an index?Hey, gang -
>
>  I've got the cycle plugin working, just great, it's a beautiful thing.
> However, I have a after callback that needs to get the index of the
> currently displayed slide. Basically, it's displaying %% of %%% (for
> those who've got an RPG-II background...). I need to show what number of
> the current total we're on.
>
>  Any ideas or suggestions, or do I go back to the drawing board?
>
>  Thanks!
>  - Toby
>    AIM: tobyParent
>    [EMAIL PROTECTED]

Reply via email to