Created
March 7, 2013 04:08
-
-
Save fnando/5105511 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en" dir="ltr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <style type="text/css"> | |
| div { height: 50px; width: 500px; } | |
| .d1 { background: red; } | |
| .d2 { background: blue; } | |
| .d3 { background: yellow; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="d1"></div> | |
| <div class="d2"></div> | |
| <div class="d3"></div> | |
| <script type="text/javascript" src="jquery.js"></script> | |
| <script type="text/javascript"> | |
| var d1 = $(".d1").animate({width: 50}, 3000).promise(); | |
| var d2 = $(".d2").animate({width: 70}, 4000).promise(); | |
| var d3 = $(".d3").animate({width: 90}, 5000).promise(); | |
| $.when(d1, d2, d3).done(function(){ | |
| alert("All animations done!"); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment