Created
March 14, 2012 05:40
-
-
Save EhevuTov/2034356 to your computer and use it in GitHub Desktop.
Jquery Dual Animation
This file contains 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> | |
<head> | |
<style> | |
div { | |
background-color:#bca; | |
width:100px; | |
border:1px solid green; | |
} | |
</style> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
</head> | |
<body> | |
<button id="go">» Run</button> | |
<div id="block1">Hello1!</div> | |
<div id="block2">Hello2!</div> | |
<script> | |
/* Using multiple unit types within one animation. */ | |
$("#go").click(function(){ | |
$("#block1, #block2").animate({ | |
width: "70%", | |
opacity: 0.4, | |
marginLeft: "0.6in", | |
fontSize: "3em", | |
borderWidth: "10px" | |
}, 1500 ); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment