I'm thinking you'll stumble on this and be able to help. This JS is not working on my localhost and wondering why. I've tried Chrome, Opera, and FF. No, I do not have javascript turned off in browsers.
REFERENCE: https://goo.gl/vELiXk
REFERENCE: http://jsfiddle.net/2VETF/3/
What I have:
Code: Select all
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<script>
$(function() {
$(".inputs").keyup(function () {
if (this.value.length == this.maxLength) {
$(this).next('.inputs').focus();
}
});
});});
</script>
<style type="text/css">
<!--
input { width: 30px; margin: 5px; }
-->
</style>
</head>
<body>
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
</body>
</html>