Created
February 18, 2012 22:08
-
-
Save bcardarella/1861131 to your computer and use it in GitHub Desktop.
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> | |
<title>My App</title> | |
<script src="jquery.min.js"></script> | |
<style> | |
div { | |
position: absolute; | |
width: 50px; | |
height: 50px; | |
top: 100px; | |
left: 100px; | |
background: gray; | |
-webkit-transition: top 1s ease, left 1s ease, background 1s ease 1s; | |
} | |
div.state_1 { | |
top: 400px; | |
left: 600px; | |
background: black; | |
} | |
</style> | |
<script> | |
$(function() { | |
$('#box').click(function() { | |
$(this).toggleClass('state_1'); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="box"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment