Para aplicar o código usado neste site usei o seguinte código:
function checkForEnter (event) {
    if (event.keyCode == 13) {
        currentBoxNumber = textboxes.index(this);
        if (textboxes[currentBoxNumber + 1] != null) {
            nextBox = textboxes[currentBoxNumber + 1]
            nextBox.focus();
            nextBox.select();
            event.preventDefault();
            return false;
        }
    } 
}
function AtivarEnterEmulation()
{
    textboxes = $('input.data-entry')
    if ($.browser.mozilla) {
        textboxes.keypress(checkForEnter);
    } else {
        textboxes.keydown(checkForEnter);
    }
}
$(function() {
    textboxes = null
    AtivarEnterEmulation()
}Lembrando que o código só funcionará nos INPUT com a Classe "data-entry", é possível fazer para todos os INPUT's mas pode causar efeitos indesejados como enter pra pesquisar...Esse código só funciona com itens INPUT, SELECT, OPTION e outros não... Estou estudando para tornar posísivel com eles também...
Segue link do código no Pastebin: http://pastebin.com/f21db529e
Nenhum comentário:
Postar um comentário