$('input[typte=text].on('keypress blur', function (e) { if (e.keyCode === 13 || e.type === 'blur') { console.log('success') } });