[Support request] How to remove jquery.min.js

Home Forums Support [Support request] How to remove jquery.min.js

Home Forums Support How to remove jquery.min.js

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2389385
    Charbel

    Hello Team,

    I know that GP Premium uses jQuery for the sticky navigation, infinite scroll, and masonry options.
    Those will all need to be turned off in order to remove jquery.

    I am using only the sticky navigation, can we use an alternate approach to keep sticky navigation without GP Premium, so we can remove jquery.min.js.

    A step-by-step guide is highly appreciated.

    Google PageSpeed is always complaining about Eliminate render-blocking resources for jquery.min.js.

    My site: https://charbelnemnom.com

    Many Thanks!
    -Charbel

    #2389602
    David
    Staff
    Customer Support

    Hi there,

    you would need to disable the Sticky Navigation option in the theme.
    And the use a CSS solution:

    #site-navigation {
        position: sticky;
        top: 0;
    }

    Things to note:
    There is no transition animation with the CSS method.
    If disabling the Sticky Nav, and you still see jQuery loading, then there are other plugins or code that require it.

    #2389608
    Charbel

    Thank you @David, much appreciated!

    Could you please clarify the transition animation for the Sticky Navigation?
    What does it mean?
    Do I have transition animation in my Sticky Navigation menu?

    Thanks!
    -Charbel

    #2389651
    David
    Staff
    Customer Support

    See here:

    https://docs.generatepress.com/article/sticky-navigation/

    You currently have the Transition set to Slide.

    The CSS i provided cannot do that. It will simply stick to the top on scroll

    #2389754
    Charbel

    Many Thanks, @David!

    I will see if None is sufficient, then I will disable Sticky Nav in GP Premium and use the CSS code.

    #2389776
    Charbel

    Hello @David,

    How can I disable Sticky Nav in GP Premium to stop loading the jquery.min.js?

    Do I need to set it to OFF inside Appearance > Customize > Layout > Sticky Navigation, or do I need to disable the entire module in the GeneratePress Menu Plus?

    Thanks!

    #2390071
    David
    Staff
    Customer Support

    Do I need to set it to OFF inside Appearance > Customize > Layout > Sticky Navigation

    Yes.

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