This will show how to move Ball Left, Right, Up and Down using Jquery Animation. In this example we have created four button. The right button moves ball to the right, left button moves ball to the left, down button moves ball to down and up button moves ball to the up.

Watch this video in youtube

Source Code

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Jquery Animation Ball - Up, Down, Right, Left</title>
<script src=""></script>
<style type="text/css">
        position: relative; /* Required to move element */
<script type="text/javascript">
    <button id="button1">Go Right</button>
    <button id="button2">Go Left</button>
    <button id="button3">Go Down</button>
    <button id="button4">Go Top</button>
    	<img src="ball.gif" width="100" height="100" alt="Mushroom">


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.