DEV Community


Posted on • Updated on

Learn jQuery Animate method on Youtube

The jQuery Animate method, as all of us know, is used to make great animation effect on web pages quite easily. It is also very easy to learn, hardly takes 15 minutes of your time.




Let us see a simple example where I will be animating a square from left to right.

The code for this is:

$("#div1").animate({ left: '250px' });

Here 'div1' is the square, to whom you can provide any size or color using your normal CSS.

And when you run your web page, It will look like this:

alt text

Isn't this method great?
Let me know your thoughts.

Top comments (3)

dance2die profile image
Sung M. Kim

Would you update the tag from #dotnet to "#jquery" and "#javascript"?

yogyogi profile image
yogyogi • Edited

Yes sure, I did it now.

dance2die profile image
Sung M. Kim

Thanks, @yogyogi
Hopefully people in need can find it easier~ 👋