 <p>Write only one function &amp; call it on both event.</p> <pre><code>$( "#target" ).keypress(function() { </code></pre> <p>funABC(); });</p> <pre><code> $( "#target" ).click(function() { </code></pre> <p>funABC(); });</p> <pre><code>function funABC(){alert("DONE");} </code></pre> <p>One more shortcut :</p> <pre><code> $( "#target" ).click(function() { $( "#target" ).keypress(); }); $( "#target" ).keypress(function() { funABC(); }); </code></pre>