Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Animation in jquery

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

    Animation in jquery is used for creative designing and give an amazing view to the user. A wide range of effects is possible using jquery animate function, here I am showing you a simple line of code example that will provide to a text and div, new look, touchup and add also effects to it, User can take help from this code it can be used for the animation instead of using flash. User can also add effect like Fade-in and Fade-out, and also add speed on click event.

    Source Code:

    <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
        $("button").click(function(){
            $("#p1").css("color", "green")
                .slideUp(3000)
                .slideDown(2000)
        
            $("div").animate({ left: '250px',
                opacity: '0.5',
                height: '150px',
                width: '150px'
                 });
            });
    });
    </script>
    </head>
    <body>
    <button>click me</button>
    <p id="p1">jQuery is fun!! push me up/i'll automatically puch down</p>
    <button>Start Animation</button>
    <div style="background:#5DA110;height:100px;width:100px;position:absolute;"></div>
    
    </body>
    </html>

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
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: