Enter/Returnキーによるサブミットを無効化するjQueryプラグイン。
;(function (window, document, $) {
$.fn.cancelSubmit = function() {
return this.each(function () {
$(this)
.find(':text').on('keypress', function (e) {
if (e.keyCode === 13) {
e.preventDefault();
}
});
});
};
}(window, document, jQuery, undefined));