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

Ready cursor

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28586
    mtmadmin35mtmadmin35
    Participant

    Hi guys… how can I have the cursor there and waiting/flashing… like some sites do? like…

    http://cyber-edge.com

    Thank you!!

    #28590
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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?
    Then we can maybe suggest a custom code snippet.

    #28594
    mtmadmin35mtmadmin35
    Participant

    Thanks 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!

    #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
    }
    #28688
    mtmadmin35mtmadmin35
    Participant

    Thanks 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!

    #28704
    Ernest MarcinkoErnest Marcinko
    Keymaster

    This 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.