Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

meaning and function of all JS files

  • hey!

    Doing some spring cleaning for page speed and I wonder what is the purpose of all these JS files and what is their function.

    For example I know jquery is only used for sticky navigation.. I.e. if I dont use sticky navigation i might think about removing jquery.

    /wp-includes/js/jquery/jquery.min.js?ver=3.6.3
    /wp-content/themes/generatepress/assets/js/menu.min.js?ver=3.1.3
    /wp-content/plugins/gp-premium/menu-plus/functions/js/sticky.min.js?ver=2.3.1
    /wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js?ver=2.3.1
    /wp-content/plugins/gp-premium/general/js/smooth-scroll.min.js?ver=2.3.1

  • Hi there,

    For example I know jquery is only used for sticky navigation.. I.e. if I dont use sticky navigation i might think about removing jquery.

    Yes, you can do so if there’re no other plugins or script is using jquery 🙂

    But if you do not use sticky navigation, jquery should not be loading.

  • Thank you!

    How about the other files, what do they do?

  • The other files you mentioned are for the Sticky Header, the Off canvas menu, and smooth scrolling, respectively.

  • sorry to ask im not so familiar what each achieve in generate press.

    If jquery is for sticky header, is sticky header for that only too? So if I dont have sticky header, i could theoretically remove both jquery & sicky header?

    And what is off canvas menu in this context?

    Is smooth scrolling only used for up down anchors, go to top of the page?

  • Here is the article for more details with regards to the Off Canvas panel if this is what you’re looking for: https://docs.generatepress.com/article/off-canvas-panel-overview/

    This is the one for smooth scrolling: https://docs.generatepress.com/article/smooth-scroll/

    As for jquery, if you don’t use the sticky header, you can remove both.

  • so /wp-content/plugins/gp-premium/menu-plus/functions/js/sticky.min.js?ver=2.3.1 is only used for sticky nav? so same as jquery

    this i believe is for the menu to function normally
    /wp-content/themes/generatepress/assets/js/menu.min.js?ver=3.1.3

    im using premium

  • Yes, you’re right about both.

  • Great thank you!

  • You’re welcome, Liish!

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