I have this jQuery
script:
$(document).ready(function() {
$(':input:enabled:visible:first').focus();
$('.letters').keyup( function() {
var $this = $(this);
if($this.val().length > 1)
$this.val($this.val().substr(0, 1));
$(this).next('input').focus();
});
});
It will set focus on the first input='text'
field on page load. When a user enters a character it will move focus to the next following input field. It will also limit the number of characters allowed in each field (currently 1 character).
I wonder if it's possible to clear the current value of the input field on focus. Both when a user clicks with the cursror to focus the field but also when the $(this).next('input').focus();
sets focus on the next input field.
Also is it possible to validate the characters to only allow alphabetical characters?