Skip to content

Instantly share code, notes, and snippets.

@cflove
Created February 28, 2014 01:57
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 cflove/9263751 to your computer and use it in GitHub Desktop.
Save cflove/9263751 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(
function() {
$('.big div').prepend('Hello <i>World</i>')
.click( function(){
$(this).parent().css('border','5px solid yellow')
} )
}
)
</script>
<!--<script type="text/javascript">
$(document).ready(
function() {
$('.big div').prepend('Hello <i>World</i>')
.click( function(){
$(this).parent().fadeOut(3000, function(){ alert('all done') } )
} )
}
)
</script>-->
<!--<script type="text/javascript">
$(document).ready(
function() {
$('.big div').prepend('Hello <i>World</i>')
.click( function(){
$(this).parent().animate({height:'300px',width:'500px'}, 2000);
} )
}
)
</script>-->
<style type="text/css">
body {padding:0px; margin:0px}
div {border:1px solid red; margin:5px; width:300px}
.big {border:5px solid green; width:400px}
</style>
</head>
<body>
<div class="big">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment