Jquery: On enter focus next input
HTML
<div class="mGrid">
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
</div>
JavaScript
$(function() {
$(".mGrid >input").on('keyup', function(e) {
if (e.which === 13) {
$(this).next('input').focus();
}
});
});