Thank you! But you only explain a fact to me. I hope you will tell me how to do some logic while animation is in progress!
On 7月6日, 上午2时59分, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > I guess, the animation process happens behind the scenes. So, if you > want to do some logic while animation is in progress, all you need to > do is to add it to the next line after the animation code. > But, if your requirement is to do some logic after the animation ends, > then you will have to supply a callback function to the animate method > and perform that logic in the callback method.. > > Did i answer your question? > > -GTG > > On 7/5/07, eddy <[EMAIL PROTECTED]> wrote: > > > > > Thank you! > > Could you tell me how to do another event while animate? > > > On 7月5日, 下午12时12分, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > > > select both and animate... like this... > > > > $("#first, #second").animate(...); > > > > I believe john once said that, the same timer is used for all the > > elements > > > if specified this way... so, you might not have problems with > > smoothness.. > > > > -GTG > > > > On 7/4/07, eddy <[EMAIL PROTECTED]> wrote: > > > > > There're two divs which have the same position, > > > > > <div id='first' style='left:0px,top:0px,width:100px,height:100px'/> > > > > <div id='second' style='left:0px,top:0px,width:100px,height:100px'/> > > > > > Is there a method to move them smoothly at the same time. > > > > > below is not good: > > > > $('#first').animate({left:'50px',top:'100px'},1000); > > > > $('#second').animate({left:'50px',top:'100px'},1000);