Default button in bootstrap modal dialog

0

I am trying to set the default button in a bootstrap modal. Here is the code: http://plnkr.co/edit/1aLlDdL8WfkUrBVt4q31?p=preview

In the modal window, I want the Submit button to be the default.

enter image description here

I tried to follow code but did not work.

$("#userNameModal").keyup(function(event){
       if(event.keyCode == 13){
           $("#submitUserNameBtn").click();
       }
});

Any help is appreciated.