Linking the pressing of Enter to a button click with jQuery
<p>I have some bottons on a modal form:</p>

<pre><code>&lt;div class="block-footer align-right"&gt;
&lt;button type="button"&gt;Submit&lt;/button&gt;
&lt;button type="button"&gt;Submit &amp;amp; Close&lt;/button&gt;
&lt;button type="button"&gt;Close&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>How can I make it so the when a user clicks on the Enter key then the first of the buttons "Submit" is "clicked". It's important for the click action as I want the user to visually see the color of the button change as it is clicked.</p>

<p>Note that I already did the following and tied the execution of a function to that button:</p>

<pre><code>$('#modal button:contains("Submit")').click(function () {
    submitHandler(dObj.$link, $('#main-form'), false);
}); 
</code></pre>
