Created
May 12, 2015 13:28
-
-
Save Shaunakde/a2edd5eef74f7f47c22c to your computer and use it in GitHub Desktop.
Jquery experimentation source http://jsbin.com/nabapo
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> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Jquery Bin</title> | |
<style id="jsbin-css"> | |
#target{ | |
color:#55F; | |
} | |
</style> | |
</head> | |
<body> | |
<div id='target'>Click to Sing</div> | |
<script id="jsbin-javascript"> | |
song = [ | |
"There is a house in New Orleans", | |
"They call the Rising Sun", | |
"And it\'s been the ruin of many a poor boy", | |
"And God I know I\'m one"] | |
cur = 0 | |
$('#target').click(function() { | |
//$( this ).slideUp(); | |
$('div#target').text(song[(cur++)%4]) | |
}); | |
</script> | |
<script id="jsbin-source-css" type="text/css">#target{ | |
color:#55F; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">song = [ | |
"There is a house in New Orleans", | |
"They call the Rising Sun", | |
"And it\'s been the ruin of many a poor boy", | |
"And God I know I\'m one"] | |
cur = 0 | |
$('#target').click(function() { | |
//$( this ).slideUp(); | |
$('div#target').text(song[(cur++)%4]) | |
}); | |
</script></body> | |
</html> |
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
#target{ | |
color:#55F; | |
} |
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
song = [ | |
"There is a house in New Orleans", | |
"They call the Rising Sun", | |
"And it\'s been the ruin of many a poor boy", | |
"And God I know I\'m one"] | |
cur = 0 | |
$('#target').click(function() { | |
//$( this ).slideUp(); | |
$('div#target').text(song[(cur++)%4]) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment