|
|
|
@ -3,18 +3,22 @@ $(function () { |
|
|
|
|
var changed = false; |
|
|
|
|
|
|
|
|
|
// Hints
|
|
|
|
|
$('.hint').replaceWith(function () { |
|
|
|
|
return '<div><a href="#" class="hintlink" onclick="$(this).next().slideToggle(); return false;">Bekijk hint</a>' + $(this).hide()[0].outerHTML + '</div>'; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function processHints() { |
|
|
|
|
$('.hint').replaceWith(function () { |
|
|
|
|
return '<div><a href="#" class="hintlink" onclick="$(this).next().slideToggle(); return false;">Bekijk hint</a>' + $(this).hide()[0].outerHTML + '</div>'; |
|
|
|
|
}); |
|
|
|
|
$('#difficulty').trigger('change'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#difficulty').change(function (e) { |
|
|
|
|
var option = $(this).find(':selected').val(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.hintlink').toggle(option == 'normal'); |
|
|
|
|
$('.hint').toggle(option == 'easy'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.localStorage.setItem('difficulty', option); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -31,7 +35,7 @@ $(function () { |
|
|
|
|
$('#difficulty').trigger('change'); |
|
|
|
|
|
|
|
|
|
function loadPage(page) { |
|
|
|
|
$('#quiz').load('/' + page + '.html?cachebuster=' + Math.random()); |
|
|
|
|
$('#quiz').load('/' + page + '.html?cachebuster=' + Math.random(), processHints); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getPage(link) { |
|
|
|
|