Answer the question
In order to leave comments, you need to log in
Solution this in setinterval?
jsfiddle.net/0ajmmk1d/1
there is a problem between setinterval and this. how to fix it?
Answer the question
In order to leave comments, you need to log in
Choice of taste:
$("input").keyup(function () {
setTimeout(() => {
$(this).next('input').focus()
}, 2000);
});
$("input").keyup(function () {
function onTimeOut() {
$(this).next('input').focus()
}
setTimeout(onTimeOut.bind(this), 2000);
});
$("input").keyup(function () {
const $input = $(this).next('input');
setTimeout(function () {
$input.focus()
}, 2000);
});
$("input").keyup(function () {
const $input = $(this).next('input');
setTimeout(function ($elem) {
$elem.focus()
}, 2000, $input);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question