 <p>Found out what the problem was.</p> <pre><code>$table.find(opt.toggleSelector).unbind('keypress').keypress(function (e) { if ($(this).hasClass('focused') &amp;&amp; e.which == 13) { //alert('You pressed enter!'); $(this).trigger(trg.toggleRow); } }); </code></pre>