Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1026879
    logoglo
    Participant

    Hi there, please refer to this page:

    http://www.logoglo.com/

    Have a look on a mobile device, the menu is a drop down ok, when you click on the one page elements such as prices, or contact, the menu stays on the screen instead of minimizing, thus it covers the entire website, and doesn’t allow the viewer to see the content.

    Thanks.

    #1027405
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To resolve this issue, please add the following JS code in the customizer, Appearance > Customize > Custom > Javascript

    (function($){
      $('.x-one-page-navigation-active .x-navbar .mobile .x-nav .menu-item').on('click touchend', function(){
        //alert('Click');
        $('.x-btn-navbar').trigger('click');
      });
    })(jQuery);

    Please let us know if this works out for you.

    #1027406
    Rupok
    Member

    Hi there,

    Please add the following Code under Customize -> Custom -> JavaScript :

    (function($){
      $('.x-navbar .x-nav-wrap.mobile a').click(function(){
        $('.x-nav-wrap.mobile').toggleClass('in').css('height', 0);
        $('.x-btn-navbar').toggleClass('collapsed');
      });
    })(jQuery);
    

    Hope this helps.

    Cheers!

    #1030723
    logoglo
    Participant

    The 1st one works, but slows my site down somewhat, is there a better way of adding that script? maybe to the theme functions?

    #1031423
    Rupok
    Member

    Hi there,

    Thanks for writing back! It shouldn’t slow down your site as it’s a simple script. However you can try adding your scripts like below on your Child Theme’s functions.php

    function my_custom_head_output() { ?>
    
    <script type="text/javascript">
      (function($){
      $('.x-one-page-navigation-active .x-navbar .mobile .x-nav .menu-item').on('click touchend', function(){
        //alert('Click');
        $('.x-btn-navbar').trigger('click');
      });
    })(jQuery);
    </script>
    
    <?php }
    
    add_action( 'wp_head', 'my_custom_head_output' );

    Hope this helps.

    Cheers!

    #1032560
    logoglo
    Participant

    Hmm, I added that code into dreamweaver to check, and there is a syntax error…

    When I add it to functions.php it doesnt work, the mobile menu stops working.

    #1032592
    logoglo
    Participant

    Hi, ok, so it works well on ONE device, and ONE rotaion…on a tablet, the background looks great portrait, if you turn it to landscape, it zooms in and looks ugly.

    For mobile, landscape and portrait it looks terrible.

    Is there a solution for both? to get it to look like the dektop version (without parallax obviously)

    Thanks.

    #1033173
    Rad
    Moderator

    Hi there,

    Hmm, does that mean the javascript works on all devices and orientation? And your issue now is the background?

    And about the background, is it body background or section’s background? I don’t see any issue and there is no parallax at all even on desktop.

    Thanks!

    #1034542
    logoglo
    Participant

    Sorry, that last reply was for another thread.

    I added that code into dreamweaver to check, and there is a syntax error…

    When I add it to functions.php it doesnt work, the mobile menu stops working.

    #1035130
    Rad
    Moderator

    Hi there,

    The code seems to be correct, what error you’re getting? Would you mind providing your screenshots?

    Thanks!

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