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

Cannot click in search field…

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Cannot click in search field…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1611
    Keith GrobenKeith Groben
    Participant

    I added this code in my header file: <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>

    It is replacing the regular WP search bar in the 2014 theme.

    <div id=”search-container” class=”search-box-wrapper hide”>
    <div class=”search-box”>
    <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>
    <?php // get_search_form(); ?>
    </div>
    </div>

    The problem is… I cannot click in the search field. How do I fix this?

    #1612
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I see that the search field is inside a hidden div and it only activates after clicking the search icon. The problem is, that one of the important events is not firing this way. Luckily, there is a very easy fix for that. Put this code in the site header of footer:

    <script>
    aspjQuery(document).ready(function(){
      aspjQuery('.search-toggle').click(function(){
        aspjQuery(window).resize();
      })
    });
    </script>
    #1614
    Keith GrobenKeith Groben
    Participant

    Thanks for getting back to me quickly. I did put the code in the header, in the <head> tag. Unfortunately this had no effect. Could you recommend anything else?

    #1615
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I see 🙂 The problem is that it’s almost on the top of the head tag, and the javascript files are not loaded yet. Try to locate the wp_head(); call in the template header file, and if you put it just under there, it should work then 🙂

    #1616
    Keith GrobenKeith Groben
    Participant

    This works perfectly now! Thank you for your help. This plugin is the best search bar I’ve seen by far. Keep it up!

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