Skip to content

Instantly share code, notes, and snippets.

@demogar
Created May 25, 2010 14:57
Show Gist options
  • Save demogar/413217 to your computer and use it in GitHub Desktop.
Save demogar/413217 to your computer and use it in GitHub Desktop.
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('input.text').keyup(function() {
if ($(this).val().length > 0) {
$(this).next('input.text').focus();
}
});
});
</script>
<p>
<input type="text" name="algo" value="" class="text" />
<input type="text" name="algo" value="" class="text" />
<input type="text" name="algo" value="" class="text" />
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment