Skip to content

Instantly share code, notes, and snippets.

@Shaunakde
Created May 12, 2015 13:28
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 Shaunakde/a2edd5eef74f7f47c22c to your computer and use it in GitHub Desktop.
Save Shaunakde/a2edd5eef74f7f47c22c to your computer and use it in GitHub Desktop.
Jquery experimentation source http://jsbin.com/nabapo
<!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>
#target{
color:#55F;
}
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