I\'ve got four inputs that each take one number. What I want to do is set the focus automatically to the next input once the number has been set. They all have the class \"i
If you just want to look at the next input but you have say separators in the way like this
/
/
You will need to you the this code to get all the next items and settle on the first input found:
$('input#dobday,input#dobmonth,input#dobyear').on('input', function(e) {
if (jQuery(this).val().length >= parseInt(jQuery(this).attr("maxlength"), 10)) {
if (jQuery(this).attr('id') === 'dobyear') {
jQuery(this).blur();
} else {
jQuery(this).nextAll('input:first').focus();
}
}
}