Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .animate({
- height: 100,
- width: 200,
- marginTop: 50
- },duration)
- .animate({left:0px})...
- .animate({left:0px},200)
- $("#block").animate({width: "70%",}, 1500 );
- Object with CSS properties ----^ ^--- Milliseconds
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- div {
- background-color:#bca;
- width:100px;
- border:1px solid green;
- }
- </style>
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- </head>
- <body>
- <button id="go">» Run</button>
- <div id="block">Hello!</div>
- <script>
- /* Using multiple unit types within one animation. */
- $("#go").click(function(){
- $("#block").animate({
- width: "70%",
- opacity: 0.4,
- marginLeft: "0.6in",
- fontSize: "3em",
- borderWidth: "10px"
- }, 1500 );
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement