-
AuthorPosts
-
August 7, 2020 at 8:25 pm #1236119
Hallo , please i want to make me mobile and tablet menu shrinked as desktop version with the difference , if scroll on mobile/tablet down menu schrink upsite and its invisible, if scroll up menu schrink down and its visible
August 12, 2020 at 2:13 pm #1236981Hey DovolenkujLacno,
Sorry for the delay. We are a little confuse about your inquiry. Could you explain it a bit further? You could also provide a screenshot using imgur or dropbox so that we can better understand what you’re trying to do.
Best regards,
IsmaelAugust 22, 2020 at 11:15 am #1239944I would like the same header as for the phone as it is now for computers. I want to have a header for mobile phones and tablets, so let it be fixed at the top and when I scroll down, let it just shrink to 40 px. The science example shows the current state. I also want the same header for phones and tablets as it is now in the video for computers
August 22, 2020 at 11:16 am #1239945The domain diehilfe.ch was just for development The site is already online at entercon.ch
August 23, 2020 at 12:46 am #1240007Hi,
Thank you for the login but it is not an admin login so we can not add the script to your site.
Try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script(){ ?> <script> ( function( $ ) { 'use strict'; var $window = $( window ); var lastScrollTop = 0; var $header = $( '#header' ); var headerBottom = $header.position().top + $header.outerHeight( true ); $window.scroll( function() { var windowTop = $window.scrollTop(); // Add custom sticky class if ( windowTop >= headerBottom ) { $header.addClass( 'myprefix-maybe-sticky' ); } else { $header.removeClass( 'myprefix-maybe-sticky' ); $header.removeClass( 'myprefix-show' ); } // Show/hide if ( $header.hasClass( 'myprefix-maybe-sticky' ) ) { if ( windowTop <= headerBottom || windowTop < lastScrollTop ) { $header.addClass( 'myprefix-show' ); } else { $header.removeClass( 'myprefix-show' ); } } lastScrollTop = windowTop; } ); } ( jQuery ) ); </script> <?php } add_action('wp_footer', 'custom_script');
Then add this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:
@media only screen and (max-width: 767px) { .myprefix-maybe-sticky { position: fixed !important; top: -120px; width: 100%; z-index: 999; opacity: 0; background: #fff; transition: 0.3s all; box-shadow: 0 2px 3px rgba(0,0,0,0.15); } .myprefix-show { top: 0; opacity: 1; } }
Then clear your browser cache and any cache plugin, and check.
Best regards,
MikeAugust 23, 2020 at 10:14 am #1240056Thanks, it works perfectly
August 23, 2020 at 1:31 pm #1240074Hi,
Glad we were able to help, 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 -
AuthorPosts
- The topic ‘Mobile menu on scroll down hide and on scroll up show’ is closed to new replies.