How can I add a class to
===

I have a modal form:

<form data-href="//JsonLogin" id="main-form" class="form">

   <form input fields here>

    <button class="float-right" type="submit">Login</button>

</form>

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

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.

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

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


