Last active
August 29, 2015 13:56
-
-
Save cflove/9263600 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 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() { | |
$('div').prepend('Hello <i>World</i>') | |
.css({border:'5px solid red',margin:'15px',width:'500px'}) | |
.click( function(){ | |
$(this).html('You Clicked Me!') | |
} ) | |
} | |
) | |
</script> | |
<!--<script type="text/javascript"> | |
$(document).ready( | |
function() { | |
$('div').prepend('Hello <i>World</i>') | |
.css({border:'5px solid red',margin:'15px',width:'500px'}) | |
.click( function(){ | |
mywidth = 300 | |
$(this).html('You Clicked Me!') | |
.css({width:mywidth}) | |
} ) | |
} | |
) | |
</script> | |
--> | |
<!-- | |
<script type="text/javascript"> | |
$(document).ready( | |
function() { | |
$('div').prepend('Hello <i>World</i>') | |
.css({border:'5px solid red',margin:'15px',width:'500px'}) | |
.hover( function(){ | |
mywidth = $(this).width() + 100 | |
$(this).html('You Clicked Me!') | |
.css({width:mywidth}) | |
} ) | |
} | |
) | |
</script> | |
--> | |
<!--<script type="text/javascript"> | |
$(document).ready( | |
function() { | |
$('div').prepend('Hello <i>World</i>') | |
.css({border:'5px solid red',margin:'15px',width:'500px'}) | |
.hover( function(){ | |
mywidth = $(this).width() + 100 | |
if (mywidth > 1000 ) { | |
mywidth = 1000 | |
} | |
$(this).html('You Clicked Me!') | |
.css({width:mywidth}) | |
} ) | |
} | |
) | |
</script> | |
--> | |
<style type="text/css"> | |
div {border:1px solid red; margin:5px; width:300px} | |
</style> | |
</head> | |
<body> | |
<div>1</div> | |
<div>2</div> | |
<div>3</div> | |
<div>4</div> | |
<div>5</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment