- May 2, 2010
- 9,937
- 16,034
It show you just how much a clue I have about javascript, I'm not actually sure if this is vanilla or jquery?
Anyway the code I have is
I need the function to run on ready, and then when there is a change, can anyone tell me how I do that here?
Cheers
Anyway the code I have is
JavaScript:
$(document).on('ready',prepare() {
$(document).on('change',prepare() {
})
function prepare {
const checkbox = document.querySelector('input[name="timescale_radio_buttons"]:checked').value;
document.getElementById('output-2').innerHTML = "Time: " + checkbox;
}
})
I need the function to run on ready, and then when there is a change, can anyone tell me how I do that here?
Cheers