Mobile Page Snaps Down On Scroll

Support Forums for LiveMesh Themes & Plugins Forums Austin Theme Support Mobile Page Snaps Down On Scroll

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24956
    USG
    Member

    Hi there!

    I noticed an issue on mobile. When the user scrolls down the screen, the page has an awkward and unnecessary snap down as you move passed the header area. Is there a way that I can disable that so that it just moves down the page smoothly?

    Thank you!

    #24973
    Veena
    Moderator

    Can you pls disable sticky menu in themeoptions > general tab and see if that makes any change.

    #24977
    USG
    Member

    It didn’t work :-/ However, I like the sticky menu on desktop so that wouldn’t work for us anyway.

    #24979
    USG
    Member
    This reply has been marked as private.
    #24994
    Veena
    Moderator

    Pls try to add the below code in file js/main.js at line no:199 and see if it helps

    
     if ($(window).width() < 768) {
        $('#header').removeClass('sticky');
    }
    
    #24997
    USG
    Member

    Is there a CSS version of that I can use instead? I’d rather not modify theme files so that I don’t have to worry about that being affected in updates.

    #25002
    Veena
    Moderator

    In this case custom CSS won’t work.

    You can add the modified code in to your child theme for preventing the code from any updates.
    You can do this in the child theme by having a separate JS file in the child theme with the above code copied. You will need to ensure that your child theme JS is loaded prior to the main.js file by setting the right priority in

    https://developer.wordpress.org/reference/functions/add_action/

    when you do this –

    https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts

    in your child theme.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Austin Theme Support’ is closed to new topics and replies.