Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1210541

    Hi,

    When clicking on the magnifying glass icon in the main menu, the search dropdown is opened but the selector is on the icon and not in the placeholder (see screenshot in private content). I already added some code to hide the outline around the icon, but which code do I need to add to make the cursor to be in the placeholder and in this way, don’t need to click in the placeholder before typing search text?

    If needed, you can find a link and credentials to my website in private content.

    Thanks a lot!

    #1211702

    Hey fcp,
    Sorry for the late reply, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_searchform_script(){
      ?>
      <script>
    (function($){
      $(window).load(function() {
      $("#menu-item-search a").click(function(){
      	setTimeout(function(){
        $('#menu-item-search #searchform #s').trigger("focus");
      	}, 200);
    });
      });
      })(jQuery);
     </script>
    <?php
    }
    add_action('wp_footer', 'custom_searchform_script'); 

    Best regards,
    Mike

    #1226249

    Hi Mike,
    I forgot to tell you that your function works perfectly!
    Thanks a lot for your precious help ;-)
    Best regards

    #1226265

    Hi,
    Glad to hear, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Search dropdown placeholder’ is closed to new replies.