Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #1183032

    I have an issue with the ENFOLD submenu element. On mobile, this element does not stick and floats over the copy when I scroll. This blocks the content. It is sticky when I am on a tablet or desktop.

    My client wants to have the submenu stick just below the full-width slider image of all main menu pages: ADMISSION, ACADEMICS, FAITH, CAMPUS LIFE and GIVING.

    If this is not possible, can I block the submenu on mobile and create something else to perform the same function at the top of these pages?

    Thanks,
    Tami

    #1183209

    Hey Tami,

    Could you please attach a mockup of what you’re trying to achieve?

    You are using another menu plugin, not the Enfold’s menus. You might check the plugins docs on how to adjust it.

    Best regards,
    Victoria

    #1183294

    Here is the Enfold Fullwidth Submenu

      element on our GIVING page, mobile view. When I click from the Max Mega Menu into the page, the Fullwidth Submenu element is directly below the header image. I want it to stay there even after I scroll down the page.

      Currently the Fullwidth Submenu element is moving down the page as I scroll. And if I click any of the links on this element it positions itself on top of the content that the viewer should be seeing, rather than just above the content that the viewer wants to see.

      Here’s a video of the issue.
      Fullwidth Submenu Mobile is NOT Sticky

    #1183517

    Hi ndaeagles,

    Best regards,
    Victoria

    #1183560

    The site is functioning now. Please retry.

    #1183674

    Hi ndaeagles,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    @media only screen and (max-width: 767px) { 
        #top .av-submenu-container.av-sticky-submenu {
            position: relative !important;
        }
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1183730

    I tested this code on Android Samsung S7, Samsung S9+, iPhone 6s, version13.3.1, and a new iPhone 11.

    – The iPhone 11 had the menu at the top of the page and it did not float over the page content. The iPhone 6 worked in the same way except for the GIVING page. On the GIVING page the menu floated over the content.

    – The Samsungs had the menu at the top.

    On all phones

    – When scrolling from the top of the pages (Admissions, Academics, Faith, Campus Life, GIving) the fullwidth submenu jumps down about 50 pixels to the bottom of the blue area that is behind/below the Fullwidth Submenu. Please see video link.

    General Question: Does this type of code change require me to toggle the Performance/Compression settings?

    #1183991

    This is much closer to where I need it to be. To re-state my description of remaining issues …

    On all phones
    – When scrolling from the top of the pages (Admissions, Academics, Faith, Campus Life, Giving) the fullwidth submenu JUMPS DOWN about 50 pixels to the bottom of the blue area that is behind/below the Fullwidth Submenu. Please see video link provided above.

    1. What is making the fullwidth submenu element jump down?

    2. What is this blue area? That should not be there.

    #1184201

    Please advise on the jump and the blue area, as noted above. Thank you Victoria for assisting me with this.
    I adopted this website when the client severed ties with the developer. I am new to Enfold and not a coder so I am very appreciative of your coding skills.

    #1184899

    Hi,
    Sorry for the late reply, I have taken a look at your “giving” page on both desktop and mobile. The fullwidth sub-menu is not designed to be sticky for mobile, that’s why it’s disabled by default. There have been modifications to try to achieve this and is why you are getting the jumping and it is breaking away from the “sticky_placeholder” the “blue area”.
    I tried recreating your page and found that without modifications the sub-menu can stick to the top with this javascript at the end of your functions.php file in Appearance > Editor:

    function custom_script(){
      ?>
      <script>
    (function($){
    $(document).ready(function(){       
       var scroll_start = 0;
       var startchange = $('#sub_menu1');
       var offset = startchange.offset();
        if (startchange.length){
       $(document).scroll(function() { 
          scroll_start = $(this).scrollTop();
          if(scroll_start > offset.top) {
            document.getElementById('sub_menu1').classList.add('sticky-top');
           } else {
            document.getElementById('sub_menu1').classList.remove('sticky-top');
           }
       });
        }
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_script');

    and this css:

    .sticky-top {
        position:fixed!important;
        top:0!important;
        z-index:10000!important;
    }

    please see the screencast in the Private Content area.
    I’m not sure where the modifications are on your site, but if you can remove them then this should work for you on Enfold v4.7.3
    It looks like you are using v4.5.7, so that could be another factor.

    Best regards,
    Mike

    #1185124

    Thank you Mike. I’m going to get back to this in a day or two. I am not the original developer and am not a strong coder so I do not have confidence that I can remove the customization without fouling the good stuff.

    #1185186

    Hi,
    We will leave this open while you look into this. A couple of places to look would be if your child theme has a /shortcodes/menu/ folder in it, you could rename to something else via FTP as a test, “/menu-old/”
    and if your custom css has any reference to “sticky_placeholder” or “sub_menu1”, you could comment out to test.
    Also check your child theme functions.php.

    Best regards,
    Mike

    #1185284

    Mike,
    I have seen other tickets where you have provided support. Your instructions are so clear and it means the world to users. THANK YOU!
    Tami

    #1185520

    Hi Tami,

    Thanks for the kind feedback, I have passed it on to Mike :-)

    Best regards,
    Rikard

    #1187493

    Do you recommend editing the code within the WP framework? Another site designer/coder indicated that “The theme editor can have trouble updating active theme files in some server environments” and recommended uploading the code changes using FTP.

    #1187649

    Hi,
    There are some cases where editing files in WordPress > Appearance > Editor returns an error where it says “please use FTP” This is a safety tool, and in such case please use FTP.

    Best regards,
    Mike

    #1250417

    so will this work to make the full width menu sticky on mobile?
    if not is there a way to hide this menu on mobile?

    #1250497

    Hi,
    To hide the sub-menu on mobile please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    @media only screen and (max-width: 767px) { 
    	#sub_menu1 {
    		display:none !important;
    	}
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1250503

    That worked great, Thank you!

    I did have an issue
    I tried to add your code above to my php file and also the css to try and get the sub menu to be sticky on mobile.
    It did not work
    When I removed that code from he PHP file and the css it broke my down arrows throughout the site

    PHP:
    function custom_script(){
    ?>
    <script>
    (function($){
    $(document).ready(function(){
    var scroll_start = 0;
    var startchange = $(‘#sub_menu1’);
    var offset = startchange.offset();
    if (startchange.length){
    $(document).scroll(function() {
    scroll_start = $(this).scrollTop();
    if(scroll_start > offset.top) {
    document.getElementById(‘sub_menu1’).classList.add(‘sticky-top’);
    } else {
    document.getElementById(‘sub_menu1’).classList.remove(‘sticky-top’);
    }
    });
    }
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘custom_script’);

    CSS:
    .sticky-top {
    position:fixed!important;
    top:0!important;
    z-index:10000!important;
    }

    #1250575

    Hi,
    I see that you are using Enfold v4.4.1, please update to v4.7.6.3

    Best regards,
    Mike

    #1250652

    Thanks Mike!

    #1250718

    Hey mnydish,

    I’m glad this was resolved for you.

    Best regards,
    Jordan Shannon

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