Ready cursor

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28586
    mtmadmin35
    mtmadmin35
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28594
    mtmadmin35
    mtmadmin35
    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 Marcinko
    Ernest 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
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28688
    mtmadmin35
    mtmadmin35
    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!

    Attachments:
    You must be logged in to view attached files.
    #28704
    Ernest Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.