I have variables in the scope that i'm calling jQuery

- won't they be lost inside the anonymous function ?

E.g.  how do I do this :

var my_z_index = 10

$(el).animate( css, speed, function(){
     $(el).css(zIndex: my_z_index)
   });

On 15 Oct, 17:16, "mike.helgeson" <[EMAIL PROTECTED]> wrote:
> $(el).animate( css, speed, function(){
>    callback.apply( this, [ arg1, arg2, ...] );
>    });
>
> On Oct 15, 11:46 am, weepy <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I want to run a function on completion of an animation
> > I want to pass in arguments to this function. Is this possible ?
>
> > e.g.
>
> > $(el).animate(css,  speed, function callback(args to pass in) { /* do
> > stuff */) )
>
> > Any one know how to do this ?
>
> > cheers
>
> > weepy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to