Skip to content

Instantly share code, notes, and snippets.

@belison
Last active August 29, 2015 14:27
Show Gist options
  • Save belison/65ba961ac19f1ff10910 to your computer and use it in GitHub Desktop.
Save belison/65ba961ac19f1ff10910 to your computer and use it in GitHub Desktop.
function theNameOfYourCallbackFunction(quiz){
quiz.on('question:enter', function(){
refreshAdWhenQuestionChanges();
});
quiz.on('result:enter', function(result){
if (result.title == 'My Result') {
handleMyResultSpecial();
} else if (result.score < 25) {
handleTerribleScore();
} else {
handleAllOtherResults();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment