- This topic has 13 replies, 5 voices, and was last updated 3 months, 2 weeks ago by David.
March 25, 2020 at 5:24 am #1209400Chad
The hamburger menu on mobile seems to be dependent on jQuery. Any chance this could be removed?
This would give me the ability to block jQuery from enqueuing on pages where it isn’t needed and save payload size.
Thank you.March 25, 2020 at 6:04 am #1209424DavidStaffCustomer SupportMay 22, 2020 at 1:33 am #1296321Chad
Got it. Thanks.May 22, 2020 at 4:47 am #1296503DavidStaffCustomer SupportMarch 27, 2021 at 11:59 am #1712359acela
On another post, David wrote (January 9, 2021):
yes the Sticky Nav is still using jQuery. It will be replaced very soon in an upcoming update with vanilla JS.
Any hope for this soon? It seems everyone is ditching jQuery now (because they can):
Thanks!March 27, 2021 at 5:04 pm #1712462LeoStaffCustomer SupportJune 7, 2021 at 10:14 pm #1814241Prajwal
Any progress on this one ?. I disabled the jQuery today and the hamburger menu on mobile doesn’t work.June 7, 2021 at 10:37 pm #1814252ElvinStaffCustomer Support
We’re not fully there yet.
While we’ve done this for the base GP theme scripts, GP Premium takes a lot of time as there are significantly more scripts in it.
There’s no ETA yet as to when it’s going to be released, but it’s likely after GPP 2.1.
A wise man once said:
"Have you cleared your cache?"June 7, 2021 at 11:05 pm #1814274Prajwal
Ok so probably another year as I see GPP is still at 2.0.2.June 8, 2021 at 2:30 am #1814460DavidStaffCustomer Support
we removed most of the jQuery dependency in GP 2.0.
GP now only loads jQuery for the Sticky Navigation and some Woocommerce functions ( which we won’t necessarily change as Woocommerce is jQuery dependent ).
The mobile navigation has never required jQuery.
If its breaking then its’s most likely another jQuery dependent script is at fault. One broken JS can stop the browser from executing other scripts.June 9, 2021 at 3:06 am #1815859Prajwal
Hi David, if i disable Jquery, the menu doesn’t drop-down when viewed from Mobile.June 9, 2021 at 4:57 am #1815968DavidStaffCustomer Support
First make sure the Sticky Navigation ( Sticky Mobile Header ) is disabled. This will ensure the Theme is NOT loading jQuery.
Then check to see if your site is loading jQuery. If it is then theres another plugin making that request. You will need to eliminate that plugin before you can disable jQuery.June 9, 2021 at 5:00 am #1815975Prajwal
Here is what i did. I first disabled all the plugins and I noticed that Jquery was still loading. But I did not disable sticky navigation and I am going to try it now.June 9, 2021 at 6:17 am #1816054
- You must be logged in to reply to this topic.