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

Cursor ready

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34842
    Eduardo31Eduardo31
    Participant

    Hello, is it possible to have the cursor ready flashing in search bar when the visitor charge the website? The idea is not to have to click for start writing, something like in google.com

    Thank you!

    #34867
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It should be doable via a custom code. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    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
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.