Skip to content

Instantly share code, notes, and snippets.

@jdaly13
Created March 17, 2015 19:30
Show Gist options
  • Save jdaly13/955694107dfef8b6910d to your computer and use it in GitHub Desktop.
Save jdaly13/955694107dfef8b6910d to your computer and use it in GitHub Desktop.
word Game HTML setup
<div id="WordGAME" class="module moduColor_Dark hangman_jury" >
<div class="grid-container">
<div class="loader">Loading</div>
<div class='hide'>
<h2 class="module-header">Who Am I?</h2>
<div class="social">
<div class="currentScore">
<span>Correct</span>
<b>0</b>
</div>
<div class="shaingIsCaring">
<span>share your score</span>
<a href="#" data-game-sharebtn="facebook"><i class="icon-facebook"></i></a>
<a href="#" data-game-sharebtn="twitter"><i class="icon-twitter"></i></a>
</div>
</div>
<div class="rightOrWrong">
<span class="icon-close small hide"></span>
<span class="icon-checkmark small hide"></span>
</div>
<div class="JCMultiRow row-item-circles row-item-centered">
<div class="row-item character-item">
<div class="row-item-image">
<a class="row-item-image-url">
<img src="" title="" alt="" class="">
</a>
</div>
</div>
<div class="word">
</div>
</div>
<div class="takeAction">
<span class="primary view">View Character Page</span>
<span class="primary reveal">Reveal Character</span>
</div>
</div>
</div>
</div>
<script>
(function () {
Juggernaut.overRideJanrain = true; //override Janrain default settings so I canz do my own thang!
var $wordGame = $('#WordGAME');
$wordGame.data = null;
$.getJSON('/characters/wordgame', function (data) {
$wordGame.data = Juggernaut.utilities.shuffleArray(data); //shuffle the data on each page load
}).done(function() {
$wordGame.WordGame({
data:$wordGame.data,
dataLength: $wordGame.data.length,
socialSharing: true,
analytics: true,
userID: Math.random()
});
});
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment