Created
October 20, 2022 04:03
-
-
Save SteveJonesDev/9cd0912ae37f47ca498c2b6279d76d02 to your computer and use it in GitHub Desktop.
FacetWP submit search field with enter key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).keypress(function(event){ | |
| var keycode = (event.keyCode ? event.keyCode : event.which); | |
| if(keycode == '13'){ | |
| if($('.facetwp-search').is(":focus")){ | |
| FWP.refresh(); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment