I am searching for a solution to let an event fire on a radio group after some time delay.
Specifically, I need to ask users a question and want to submit their input without having the users click a separate button. At the same time, it shall be possible that the user clicks different radio buttons while considering the answer.
onInput
and onChange
are both fired immediately after a user click. However, is there another solution?
Here is small example:
<div class="form-check form-check-inline">
<label> What is 17 * 21? </label>
<br></br>
<input class="form-check-input" type="radio" id="MC_0" name="MC_first" value="1" oninput="console.log('here');">
<label for="MC_0" class="form-check-label">263</label>
<input class="form-check-input" type="radio" id="MC_1" name="MC_first" value="2" oninput="console.log('here');">
<label for="MC_1" class="form-check-label">357</label>
</div>
I would love to have oninput
only fire after, say, 5 seconds without activity in this radio group.