facetwp submit button on enter

(function($) {
    $(document).keyup(function(event){
        var keycode = (event.keyCode ? event.keyCode : event.which);
        if(keycode == '13'){
            FWP.parseFacets();
            FWP.setHash();
            $( ".fwp-submit" ).trigger( "click" ); 
        }
    });
})(jQuery);