Sathish Manohar Sathish Manohar - 1 year ago 88
Javascript Question

How to move a div with slight lag using jquery

I am working on a Jquery animation in which I want to animate a balloon to move off screen. I have figured out the movement part. But, I couldn't quite figure out how to make it move realistically with slight lags as a real balloon.


function moves the element in linear motion.

$( document ).ready(function() {
$("#section").click(function() {
$('.parachute').animate({bottom: "1500px"}, 5000);

How should I go about doing that. Please find the animation in below link.

Answer Source

Instead of trying to animate the path of the animation, use an online tool or Photoshop to create an animated balloon image.

This one looks nice in your fiddle :)

$('.parachute').animate({bottom: "1500px"}, 5000);

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download