Skip to content

Instantly share code, notes, and snippets.

@stla
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stla/9238990 to your computer and use it in GitHub Desktop.
Save stla/9238990 to your computer and use it in GitHub Desktop.
Jean-Luc
<!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:"200px"});
$("#box").animate({height:"auto"});
$("#box").animate({width:"300px"});
$("#box").animate({width:"200px"});
});
$("#btn2").click(function(){
$("#box").animate({width:"500px"});
$("#box").animate({height:"auto"});
});
});
</script>
</head>
<body>
<button id="btn1">Animate</button>
<button id="btn2">Reset</button>
<p><img id="box" src="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash4/t31/p180x540/1941417_10202123904192931_1222991803_o.jpg" width="500px" align="right"/></p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment