Function not bound in document.ready

Function not bound in document.ready

I have the following script which should bind the input form so that it doesn't refresh when enter is pressed.

  1. < script type ="text/javascript">

    $(document).ready( function () {

    $( 'input.form-control' ).keypress( function (e) {

    if (e.keyCode === 13)

    return false ;

    });

    });

    </ script >

However, it just does bind anything to the input. It does work when I try debugging it on firebug, putting a breakpoint from the start.  Anybody know why?