Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var category = $(this).parent().data('category');
- var value = $(this).data('question');
- var score = $('#unanswered').html();
- var tempvar = x[category][value];
- var answers = $('#answers');
- function handleAnswer(){
- $('.answer').click(function(){// hide empty the tile, mike it unclickable, update the score if correct, and hide the modal
- var tile = $('div[data-category="'+$(this).data('category')+'"]>[data-question="'+$(this).data('question')+'"]')[0];
- $(tile).empty().removeClass('unanswered').unbind().css('cursor','not-allowed');
- if ($(this).data('correct')){
- score += parseInt($(this).data('value'));
- }
- $('#question-modal').modal('hide');
- updateScore();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement