Last active
August 29, 2015 13:57
-
-
Save christurnertv/9672586 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
<html> | |
<head> | |
<title>Fade Out Sample</title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
</head> | |
<body> | |
<img src="img/mole.jpg" style="display:none;"> | |
<script> | |
$('img').click(function () { | |
$(this).fadeOut(); | |
}); | |
$('img').fadeIn(); | |
</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
<html> | |
<head> | |
<title>Awesome Mole Game</title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<style> | |
#game-board { | |
margin: 10px auto; | |
width: 456px; | |
} | |
.mole-hole { | |
border: 1px solid black; | |
float: left; | |
height: 150px; | |
width: 150px; | |
} | |
img { | |
height: 150px; | |
width: 150px; | |
} | |
body { | |
text-align: center; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Awesome Mole Game</h1> | |
<div id="game-board"> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
</div> | |
<script> | |
</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
<html> | |
<head> | |
<title>Awesome Mole Game</title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<style> | |
#game-board { | |
margin: 10px auto; | |
width: 456px; | |
} | |
.mole-hole { | |
border: 1px solid black; | |
float: left; | |
height: 150px; | |
width: 150px; | |
} | |
img { | |
height: 150px; | |
width: 150px; | |
display: none; | |
} | |
body { | |
text-align: center; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Awesome Mole Game</h1> | |
<div id="game-board"> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
<div class="mole-hole"> | |
<img src="img/mole.jpg"> | |
</div> | |
</div> | |
<script> | |
var holes = $('.mole-hole'); | |
var rand = Math.floor(Math.random() * holes.length); | |
$(holes[rand]).children().fadeIn(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment