Does anyone know how to use a global declared variable inside the following function?
Global value:
window.waarde = document.getElementById("id_x").value;
Function:
$(function () {
$('input[value="This is where the variable should be"]')
.filter(':visible:first')
.prop('checked', true);
});
I've looked everywhere but can't find an answer.
window.waardeor justwaarde?