Skip to content

Instantly share code, notes, and snippets.

@jescalan
Last active December 14, 2015 13:49
Show Gist options
  • Save jescalan/5096553 to your computer and use it in GitHub Desktop.
Save jescalan/5096553 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content=" a bouncing ball with js">
<meta name="keywords" content="bouncing, 3d, ball, round, web development, kittens">
<meta name="author" content="Kitty Cat">
<title>Create A Bouncing Ball</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link href='http://fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="ballz.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).ready(function() {
$(".btn").on('click',function(){
$('#ball').animate({top:"+=150px"}, 200, function(){
$('#ball').animate({top:"-=150px"}, 150);
});
});
});
</script>
</head>
<body>
<div id="page-wrap">
<div class="header">
<h1>working with Javascript</h1>
<h2><a href="http://www.thegutterbrooklyn.com/">let's play ball!</a></h2>
<div id="starz">
<div class="btn">START</div>
<div id="ball"></div>
</div><!-- end #starz -->
<div class="footer">
<p>3.2 Making Kittens Fly With Javascript
<a href="https://github.com/angelawyman/flying-kittens"<span style="color:#264c72";>• Available on GitHub •</span></a>
<a href="http://www.skillshare.com/profile/Angela-Wyman/544585"<span>Angela Wyman, 2013 &copy;</span></a>
</p>
</div><!-- end .footer -->
</div>
</div><!-- end #page-wrap -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment