Created
February 14, 2014 19:17
-
-
Save stla/9007180 to your computer and use it in GitHub Desktop.
my first jQuery test
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> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> | |
</script> | |
<script> | |
$(document).ready(function() | |
{ | |
$("#btn1").click(function(){ | |
$("#box").animate({width:"300px"}); | |
$("#box").animate({height:"300px"}); | |
}); | |
$("#btn2").click(function(){ | |
$("#box").animate({width:"700px"}); | |
$("#box").animate({height:"700px"}); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<button id="btn1">Animate</button> | |
<button id="btn2">Reset</button> | |
<p><img id="box" src="http://www.wmskill.com/wp-content/uploads/2013/04/ImageMagick.jpg" width="700px" align="right"/></p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment