Mayfoo Posted September 21, 2021 Share Posted September 21, 2021 Hi, I am creating a multilingual site. In which I had created 2 blogs with different languages. I am using a search bar for the blog posts. I would like to disable the search result page redirection after hit "Enter" key. So I don't have to inject more code to make it looks multilingual. Is there : 1) A way to stop redirect to search result page after hit "Enter" key? 2) I had try to disable "Enter" with code injection in the blog page. The if-else statement is working as expected, but "Enter" key is still working. Where I did wrong? $(document).ready(function() { $('.sqs-block-search').on('keypress keydown keyup', function(e){ if(e.keyCode == 13) { e.preventDefault(); } }); }); 3) Is there a way to inject slug (e.g. /en ) in the URL of search result page, so it can be multilingual? Many thanks. Link to comment
tuanphan Posted September 24, 2021 Share Posted September 24, 2021 Hi, Can you share link to your site? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.