Skip to content

Instantly share code, notes, and snippets.

@cnix
Created October 27, 2008 18:27
Show Gist options
  • Save cnix/20156 to your computer and use it in GitHub Desktop.
Save cnix/20156 to your computer and use it in GitHub Desktop.
var phone_inputs = $('.phone_input').length ? $('.phone_input') : null;
if (phone_inputs) {
phone_inputs.bind('keyup', function() {
self = $(this);
if (self.val().length == self.attr('maxlength')) {
self.next().focus();
};
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment