Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ready cursor › Reply To: Ready cursor
July 22, 2020 at 9:02 am
#28603
Keymaster
It 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!
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
}