Skip to content

Instantly share code, notes, and snippets.

@stla
Created February 14, 2014 19:17
Show Gist options
  • Save stla/9007180 to your computer and use it in GitHub Desktop.
Save stla/9007180 to your computer and use it in GitHub Desktop.
my first jQuery test
<!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