Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How To Create A Simple Animation With The Help Of Jquery

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 261
    Comment on it

    Simple Animations With The Help Of Jquery

    You can slide elements or any content of HTML and even stop animations in mid-sequence. To slide elements up or down.
    
    
      $("#Element").slideDown("fast", function() {
            // For slide down
        }
        $("#Element").slideUp("slow", function() {
            // For slide up
        }
        $("#Element").slideToggle(1000, function() {
            // For slide up/down
        }
    
    
    The new styles, but instead of setting them instantly (as CSS or raw JavaScript would do), it does so gradually, animating
    the effect at the chosen speed:
    
    $("#Element").animate(
    {
        opacity: .3,
        width: "500px",
        height: "700px"
        }, 2000, function() {
        // optional callback after animation completes
        }
    );
    
    Animation with jQuery is the very powerful, and it does have its quirks (for example, to animate colors, you need a special
    plugin).
    

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