Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Autosuggest Phrases – populate on Tab
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 4 months ago.
- AuthorPosts
- February 3, 2021 at 9:28 pm #31439
Hello,
We would like the autocomplete phrase to complete when the user hits “tab” as most other autocomplete searches work this way.
Could you please help us understand if this is possible and if not, any suggestions on how we can custom develop this feature?
Thank you.
Mike Kotler
February 4, 2021 at 4:05 pm #31447Hi Mike,
You should be able to achieve that with this custom code:
Best,add_action('wp_footer', 'asp_tab_trigger_right'); function asp_tab_trigger_right() { ?> <script> jQuery(function($){ $('input.orig').on('keydown', function(e){ var kc = e.which || e.keyCode; if ( kc == 9 ) { e.preventDefault(); var ev = jQuery.Event("keyup"); ev.which = 39; $(this).trigger(ev); } }); }); </script> <?php }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 4, 2021 at 4:10 pm #31449Thank you so much. Can you please just help clarify where I should add this code? Does this go in the functions.php file? Im a very amateur developer.
Thank you again!
February 4, 2021 at 4:13 pm #31450Hi,
Sure, no problem.
Yes, optimally into the child theme functions.php file.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 4, 2021 at 4:21 pm #31452It worked great! Thank you soooo much!
February 4, 2021 at 4:24 pm #31453You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.