This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Ready cursor

#28603
Ernest MarcinkoErnest Marcinko
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
}