Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ready cursor
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 10 months ago.
- AuthorPosts
- July 20, 2020 at 10:52 pm #28586
Hi guys… how can I have the cursor there and waiting/flashing… like some sites do? like…
Thank you!!
July 21, 2020 at 10:21 am #28590Hi,
It can be doable, but requires a custom code to apply the input focus, whenever the corresponding element is clicked. Can you share a URL where we can take a look at the search implementation?
Best,
Then we can maybe suggest a custom code snippet.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 21, 2020 at 5:11 pm #28594Thanks Earnest-
The site I’m developing is behind an apache wall right now. So I can’t link you to it.
I’m using your plugin as is… I shortcoded it onto a page. So I don’t have the typical form HTML to add a focus etc. Can this be done with a shortcoded form?
Thanks!
July 22, 2020 at 9:02 am #28603It depends. Is there a specific action (like on the example page), when you want to focus the input? Or only when the page is loaded?
If you only want to focus the input once the page is ready, then this custom code may help. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,add_action('wp_footer', 'aspl_add_focus_script'); function aspl_add_focus_script() { ?> <script> jQuery( function($) { setTimeout(function(){ $('input.orig').get(0).focus(); }, 1500); }); </script> <?php }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 24, 2020 at 7:49 pm #28688Thanks Earnest. This is did not work however. I there something else you recommend I try?
I have your search field shortcoded into a page like the attached…
Thanks!
Attachments:
You must be logged in to view attached files.July 27, 2020 at 12:48 pm #28704This is the only way to do this, but the code depends on the exact search layout. I will have to see the page to be able to suggest the correct code, asi I need to look at the source. I don’t need back-end or FTP, only the page where it is present.
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.