Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1285008
    Ali
    Participant

    Hi,

    I have the navbar search enabled in Customizer, but it doesn’t seem to be doing anything when I click the magnifying glass icon.

    http://globalprogressivehub.org/

    Any suggestions?

    Thanks!

    #1285207
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    I could see an error on your broswer console. Would you mind testing for plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    If still you could not find the error, would you mind sharing us your admin credentials so we could check your setup closer.

    Don’t forget to set it as private reply.

    Thanks.

    #1285283
    Ali
    Participant
    This reply has been marked as private.
    #1285690
    Paul R
    Moderator

    Hi,

    Something in your system is preventing it from working.

    We would like to ask permission to deactivate your third party plugin to test.

    As a temporary fix I added this in custom js.

    
    jQuery(function($) {
    
      var $trigger  = $('.x-btn-navbar-search');
      var $formWrap = $('.x-searchform-overlay');
      var $input    = $formWrap.find('.search-query');
      var escKey    = 27;
    
      function clearSearch() {
        $formWrap.toggleClass('in');
        setTimeout(function() { $input.val(''); }, 350);
      }
    
      $trigger.on('touchstart click', function(e) {
        e.preventDefault();
        $formWrap.toggleClass('in');
        $input.focus();
      });
    
      $formWrap.on('touchstart click', function(e) {
        if ( ! $(e.target).hasClass('search-query') ) {
          clearSearch();
        }
      });
    
      $(document).keydown(function(e) {
        if ( e.which === escKey ) {
          if ( $formWrap.hasClass('in') ) {
            clearSearch();
          }
        }
      });
    
    });
    

    Thanks

    #1286326
    Ali
    Participant

    You have permission. Thank you for looking into this!

    #1286433
    Joao
    Moderator

    Hi There,

    Your search icon seems to be working fine on my end, on which browser and device you are experiencing the issue?

    Let us know,

    Thanks

    Joao

    #1290730
    Ali
    Participant

    Hey Joao,

    I believe Paul’s code above did the trick, so that could be why.

    #1290883
    Christopher
    Moderator

    Glad we could help you with this.

  • <script> jQuery(function($){ $("#no-reply-1285008 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>