Skip to content

Instantly share code, notes, and snippets.

@alexharris
Last active January 4, 2016 03:59
Show Gist options
  • Select an option

  • Save alexharris/8565284 to your computer and use it in GitHub Desktop.

Select an option

Save alexharris/8565284 to your computer and use it in GitHub Desktop.
function randomQuestion(){
question = mainQuestionArray[Math.floor(Math.random()*mainQuestionArray.length)];
return question;
}
function questionPopover(){
$('.desktop-question').popover({
placement: 'bottom',
trigger: 'click',
container: 'body',
content: randomQuestion()
});
$('.desktop-question').on('hidden.bs.popover', function(){
$('.desktop-question').popover('destroy');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment