You can either do:

$('#gClone0').animate({top: -allH},{
    easing: "linear",
    duration:30000,
    complete: function(){
        //callback
    }
});

or

$('#gClone0').animate({top: -allH}, 30000, "linear", function(){ //
callback });

Check the documentation page I linked, it's all in there (http://
docs.jquery.com/Effects/animate);

- ricardo

On Nov 19, 11:53 am, jonatne <[EMAIL PROTECTED]> wrote:
> Thanks, that works great.
>
> But, how do I add a callback to this now? Everything I've tried hasn't
> worked.
>
> On Nov 18, 8:25 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > You have to pass the parameters in a second object, like in:
>
> > $('#gClone0').animate({top: -allH}, {easing: "linear",duration:30000})
>
> >http://docs.jquery.com/Effects/animate
>
> > - ricardo
>
> > On Nov 18, 6:50 pm, jonatne <[EMAIL PROTECTED]> wrote:
>
> > > Hey all,
>
> > > I would like like to make an element move. I want it to start moving
> > > at a certain speed and move at that current speed until it's reached
> > > it's destination. I'm using .animate() without any easing specified.
> > > It does seem to ease though. It starts slow, speeds up to full speed
> > > and then slows down to a stop when it reaches it's destination. My
> > > question is, how do I keep it from easing or slowing at the beginning
> > > and end? I want it to start, move, and stop.
>
> > > I tried making the easing: none
> > > Also tried making the easing: linear
>
> > > Everything I do makes the element slow to a stop. I want it to move
> > > full speed until its at it's destination and then stop.
>
> > > Here's the page:http://snipurl.com/5t4ns
> > > Here's the javascript:http://snipurl.com/5t4ub
>
> > > Any way to do this with jQuery?
>
> > > Thanks for the help.

Reply via email to