Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to create animation effect using jQuery

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 292
    Comment on it

    The method used to create the custom animation of a set of CSS properties is the animate() method.

    Simple syntax to use this method is:




    • The param parameter is the required field. Is defines the CSS properties to be animated.
    • Speed parameter is optional which specifies the duration of the effect. Values can be "slow", "fast", or milliseconds.
    • Callback parameter is also optional. It is a function which will be used to execute after completing the animation.


    <!DOCTYPE html>
    <script src=""></script>
            $("div").animate({left: '500px'});
    <p>Click on the button to start animation. </p>
    <div style="background:#999;height:200px;width:200px;position:absolute;"></div>
    <button style="border:none;border-radius:40px;padding:30px;font-size:26px:background-color:#A52A2A;color:#fff">Start Animation</button>

    NOTE: By default, all HTML elements have a static position, and cannot be moved. To manipulate the position, remember to first set the CSS position property of the element to relative, fixed, or absolute!

    Click Here for output.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: