facetwp submit button on enter

djrmom

{{gist file=”facet.js” lang=”javascript”}}
(function($) {
$(document).keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == ’13’){
FWP.parse_facets();
FWP.set_hash();
$( “.fwp-submit” ).trigger( “click” );
}
});
})(jQuery);
{{/gist}}