Shift focus to next control when enter key pressed

$('body').on('keydown', 'input, select, textarea,checkbox', function(e) {
var self = $(this),
form = self.parents('form:eq(0)'),
submit = (self.attr('type') == 'submit' || self.attr('type') == 'button'),
focusable,
next;

if (e.keyCode == 13 && !submit) {
focusable = form.find('input,a,select,button,textarea,checkbox').filter(':visible:not([readonly]):not([disabled])');
next = focusable.eq(focusable.index(this)+1);

if (next.length) {
next.focus();
} else {
form.submit();
}

return false;
}
});