Potential causes
- Script Delay - This tool defers the loading of scripts in order to improve loading times. However, delaying some scripts might break site functionality, such as menus, if the script is required for the feature to work. The scripts that are required for the menu to load will depend on the theme / page builder tools you are using.
- Remove Unused CSS - The Remove Unused CSS feature detects unused CSS files and then prevents them from being loaded to improve loading speed for the necessary files and content. Sometimes CSS files will be incorectly categorized as unused because the CSS file is not needed to load the actual page and is only used when the mobile menu is selected. This can lead to Leap incorrectly removing CSS files that are needed to load the menu.
Firstly, you will need to determine which one of the features mentioned above is causing this issue. The easiest steps to take are as follows:
Step 1: Is this Leap?
- Deactivate Leap and then check your site to see if this issue is caused by Leap or something else. If the issue goes away, then we know Leap is causing the issue.
Step 2: What feature is causing this?
- Deactivate either Script Delay or Remove Unused CSS by going to the Leap dashboard > Optimize > Change Settings, then toggling off these settings one at a time.
Step 3: Preview
- Once you have disabled one of the settings, go to the preview and see if the mobile menu is working. Depending on which feature needs to be disabled, you will need to follow the appropriate procedure to fix the menu.
(Note: It can be the case that both features are causing the issue, and you will need to follow both guides below.)
Script Delay
If the issue is caused by Script Delay, follow these steps:
1. Navigate to the Script Delay settings and use the Find Delayed Scripts Tool.
![](https://support-osticket.s3.us-west-1.amazonaws.com/article_uploads/x07xOKyAGY1ntmcYiSmunjwwOZY%3D_GzbRGVf6jlbHWQgnZXJLfQ%3D%3D?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARCESARAITOPHDQ2E%2F20240907%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240907T105857Z&X-Amz-Expires=900&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAMaCXVzLWVhc3QtMSJHMEUCIDUkL5cDsXVeF%2BOiHMmHAdczOLqRhGUY43AzgHYZm1rOAiEAoct%2FlSWTABqjj%2BPF9Jpzmsl3cRdquue4uZjbBztJUUcquwUILBAAGgwwNzMzMjA2NjMwNTciDGPx9d5OC3DQsz32uCqYBfSHjz5TjGIFdLRHQgNnP3INiUXZvhIJHTddl0%2BY4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molg89DlqCE7n5VxumPROS5bV4v8gFcwLOK8h4X19CxS%2FfJGtNabkuHjY1JahFP6f07oeAgCqSGV1q04%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=3020668c36963d06c3cda7942ef12b429964d474c84cd5f31d4c188ad9fa4e75)
2. Click the “Clear Table” button, then enter the URL of the page you are troubleshooting in the “Find Scripts on URL” section and press Enter on your keyboard.
![](https://support-osticket.s3.us-west-1.amazonaws.com/article_uploads/TpbdN5G9HxVhdJ0uQhoD741iljA%3D_eTb-lByWVqC1ooz8thUIPA%3D%3D?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARCESARAITOPHDQ2E%2F20240907%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240907T105857Z&X-Amz-Expires=900&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAMaCXVzLWVhc3QtMSJHMEUCIDUkL5cDsXVeF%2BOiHMmHAdczOLqRhGUY43AzgHYZm1rOAiEAoct%2FlSWTABqjj%2BPF9Jpzmsl3cRdquue4uZjbBztJUUcquwUILBAAGgwwNzMzMjA2NjMwNTciDGPx9d5OC3DQsz32uCqYBfSHjz5TjGIFdLRHQgNnP3INiUXZvhIJHTddl0%2BY4QNdtcTdCgtO9rnNFzKgT86lGPYnEgb20%2BsbECwtdobJFka6377TrY9dmmrmPDzeQvorvPc%2FtESYkv7Q8u0EEYmKitcRLiqBq%2BMvCcjzjW1US4VAdigtq3Ijy0LlWrj6ttvnhcPK4PfaQcWUKOy4r0MCv2qHY%2FgpZkftbCh15Q9FaTVD4wpR%2FpjZlfONPGL%2BNWwm1VYWqXk%2FTZ1zZm3EV5RrcGtXV77%2FNukdeYzaHWFKD400aD8Qw8do1EoS9NIprp54%2FRSZr6OHGXCrdfeFqQc4F2E3I25lusdT3PiBzIahgph6nxRp11sglAl2UCdY9hqMGsnhw0gfTByF%2Fq23omJckhqvJ4q%2F2OHBHI69uHa%2B1E4QMsyF6ds7Fleaqoi%2BaMSsWolN%2F3IhoiNvNoDLxoaGyZp8sGz8pURzXrQAJGNf%2FnbPqwouWXZfbnjk8sTYJyLfuQwUGxJzRR%2FKQeA%2B%2FpwNxU5iJ5m0xovMrXS0I5WG6WXy7TfveRTqMirlZdQmg4Z2XdUdrzXzjluVCs427GHHQ43PsRJUYjNWDdqu%2B0VHYgz9QUcItb%2FRPNyNWFx8EM8p%2Bs5wk3Na%2BVffCs%2BOds4EXU7S1j66OM8PVzA7yNx2iO%2B%2BPOWZK6B3H5M1hgMOrEidTI3mVEcM%2B84aPzeP9KoCCJpirm%2FX3uf76jAXyBNo2UoswSpGOJbOF8bumXTWmihbpYsLNFNshTXh51hucyJpukkFNcHywfNO4FXU%2BH37oy8Rf4PtFHoORlapayfv8md%2BkDHqnt2uq92ZI9rqFu3dJisz8%2FjRhkavOQ8IA6myifzv7EV784mtqEQuyU4%2BxjzWGXohCSWnmPIwm9%2FwtgY6sQHPoZCk%2FStSp7eISRAJaYW%2Fuu%2FALpV2k0fBRGctSnEwDp9yXmNMl%2FVdy71K8I58EC4BGHF1g5xsNvr8lBJJp1lmavsQTTgtoQ1IMEItMm0e6r4mcoZWQBMhwWITyzycb%2BSyVTJSXdSxVMlmiwHRS2p%2FW4rwYZQmolg89DlqCE7n5VxumPROS5bV4v8gFcwLOK8h4X19CxS%2FfJGtNabkuHjY1JahFP6f07oeAgCqSGV1q04%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=09ec12a451d194ad19092c067eff8ec77adf0fd61c0127d5ffc5d7b1f9fe969f)
3. Review the list of external and inline scripts found on the specified URL. Scripts that are bubbled in for Don't Delay will be added to the Exclusion Rules and will no longer be delayed. Scripts bubbled in for Delay will remain delayed. The scripts that are highlighted in yellow have been marked as potentially troublesome to delay, which can help when trying to determine which scripts that are delayed may be causing problems on the site.
4. Use the search bar to filter relevant scripts by entering the name of your theme or just “theme”. The most common scripts that need to be excluded in the case of menu issues are scripts related to the theme.
5. Exclude scripts one by one by selecting Don't Delay for the troublesome scripts, then preview the site to see if this fixes the mobile menu issue. (Note: you may need to exclude multiple scripts in order for the menu to work)
6. While previewing the site, use the Chrome Dev Tools mobile preview mode (F12, then select the mobile icon) to view the mobile menu.
![](https://support-osticket.s3.us-west-1.amazonaws.com/article_uploads/xHsz8SPBVeyjG8qbB7uOvkYSP9s%3D_0hEEqFcbh0GdQovD0FjB8w%3D%3D?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARCESARAITOPHDQ2E%2F20240907%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240907T105857Z&X-Amz-Expires=900&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAMaCXVzLWVhc3QtMSJHMEUCIDUkL5cDsXVeF%2BOiHMmHAdczOLqRhGUY43AzgHYZm1rOAiEAoct%2FlSWTABqjj%2BPF9Jpzmsl3cRdquue4uZjbBztJUUcquwUILBAAGgwwNzMzMjA2NjMwNTciDGPx9d5OC3DQsz32uCqYBfSHjz5TjGIFdLRHQgNnP3INiUXZvhIJHTddl0%2BY4QNdtcTdCgtO9rnNFzKgT86lGPYnEgb20%2BsbECwtdobJFka6377TrY9dmmrmPDzeQvorvPc%2FtESYkv7Q8u0EEYmKitcRLiqBq%2BMvCcjzjW1US4VAdigtq3Ijy0LlWrj6ttvnhcPK4PfaQcWUKOy4r0MCv2qHY%2FgpZkftbCh15Q9FaTVD4wpR%2FpjZlfONPGL%2BNWwm1VYWqXk%2FTZ1zZm3EV5RrcGtXV77%2FNukdeYzaHWFKD400aD8Qw8do1EoS9NIprp54%2FRSZr6OHGXCrdfeFqQc4F2E3I25lusdT3PiBzIahgph6nxRp11sglAl2UCdY9hqMGsnhw0gfTByF%2Fq23omJckhqvJ4q%2F2OHBHI69uHa%2B1E4QMsyF6ds7Fleaqoi%2BaMSsWolN%2F3IhoiNvNoDLxoaGyZp8sGz8pURzXrQAJGNf%2FnbPqwouWXZfbnjk8sTYJyLfuQwUGxJzRR%2FKQeA%2B%2FpwNxU5iJ5m0xovMrXS0I5WG6WXy7TfveRTqMirlZdQmg4Z2XdUdrzXzjluVCs427GHHQ43PsRJUYjNWDdqu%2B0VHYgz9QUcItb%2FRPNyNWFx8EM8p%2Bs5wk3Na%2BVffCs%2BOds4EXU7S1j66OM8PVzA7yNx2iO%2B%2BPOWZK6B3H5M1hgMOrEidTI3mVEcM%2B84aPzeP9KoCCJpirm%2FX3uf76jAXyBNo2UoswSpGOJbOF8bumXTWmihbpYsLNFNshTXh51hucyJpukkFNcHywfNO4FXU%2BH37oy8Rf4PtFHoORlapayfv8md%2BkDHqnt2uq92ZI9rqFu3dJisz8%2FjRhkavOQ8IA6myifzv7EV784mtqEQuyU4%2BxjzWGXohCSWnmPIwm9%2FwtgY6sQHPoZCk%2FStSp7eISRAJaYW%2Fuu%2FALpV2k0fBRGctSnEwDp9yXmNMl%2FVdy71K8I58EC4BGHF1g5xsNvr8lBJJp1lmavsQTTgtoQ1IMEItMm0e6r4mcoZWQBMhwWITyzycb%2BSyVTJSXdSxVMlmiwHRS2p%2FW4rwYZQmolg89DlqCE7n5VxumPROS5bV4v8gFcwLOK8h4X19CxS%2FfJGtNabkuHjY1JahFP6f07oeAgCqSGV1q04%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=bce0b00c39a266a38e0330ec44d94c48f820a5c371cb6fcef7716de6d1d60f59)
7. If you are using a page builder like Elementor and excluding every script does not resolve the issue, you will need to completely disable Script Delay. (Note: Disabling Script Delay is detrimental to site speed; consider moving away from page builders like Elementor which are known for adding bloat to sites and making it difficult to optimize scripts and CSS.)
Remove Unused CSS
If the issue is caused by Remove Unused CSS, follow these steps:
1. Navigate to the Remove Unused CSS options and use the Find CSS Sheets Tool.
![](https://support-osticket.s3.us-west-1.amazonaws.com/article_uploads/NQSWHDqJYN5VRudSFmhXxtkRt7s%3D_72dSvJNntRIMxTl%2BCB2OKw%3D%3D?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AS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sLNFNshTXh51hucyJpukkFNcHywfNO4FXU%2BH37oy8Rf4PtFHoORlapayfv8md%2BkDHqnt2uq92ZI9rqFu3dJisz8%2FjRhkavOQ8IA6myifzv7EV784mtqEQuyU4%2BxjzWGXohCSWnmPIwm9%2FwtgY6sQHPoZCk%2FStSp7eISRAJaYW%2Fuu%2FALpV2k0fBRGctSnEwDp9yXmNMl%2FVdy71K8I58EC4BGHF1g5xsNvr8lBJJp1lmavsQTTgtoQ1IMEItMm0e6r4mcoZWQBMhwWITyzycb%2BSyVTJSXdSxVMlmiwHRS2p%2FW4rwYZQmolg89DlqCE7n5VxumPROS5bV4v8gFcwLOK8h4X19CxS%2FfJGtNabkuHjY1JahFP6f07oeAgCqSGV1q04%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=10d61ec9f113d1a791a26a1cf5609aceb0e05a0ed4aef04f9a420d6f2d8bfa00)
2. Click the “Clear Table” button, then enter the URL of the page you are troubleshooting in the Find Styling on URL section and press Enter on your keyboard.
3. Review the CSS files detected on that page. Files marked as Process are able to be removed by Leap. Files marked as Don't Process will be excluded from being removed by Leap.
![](https://support-osticket.s3.us-west-1.amazonaws.com/article_uploads/Si0DZw8288ul1Mv-6GCxHe--S3U%3D_yORNg%2Ba5HHGzCgSJFbybCQ%3D%3D?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARCESARAITOPHDQ2E%2F20240907%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240907T105857Z&X-Amz-Expires=900&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAMaCXVzLWVhc3QtMSJHMEUCIDUkL5cDsXVeF%2BOiHMmHAdczOLqRhGUY43AzgHYZm1rOAiEAoct%2FlSWTABqjj%2BPF9Jpzmsl3cRdquue4uZjbBztJUUcquwUILBAAGgwwNzMzMjA2NjMwNTciDGPx9d5OC3DQsz32uCqYBfSHjz5TjGIFdLRHQgNnP3INiUXZvhIJHTddl0%2BY4QNdtcTdCg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7n5VxumPROS5bV4v8gFcwLOK8h4X19CxS%2FfJGtNabkuHjY1JahFP6f07oeAgCqSGV1q04%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=3b754c539dd241b9a1be44b258eaa1bad994b9e512ff687c8ddbf6356f481f99)
4. Use the search bar to filter relevant CSS files by entering the name of your theme or just “theme”. The most common CSS files that need to be excluded in the case of menu issues are related to the theme.
5. Exclude necessary CSS files from removal one by one by selecting Don't Process for the relevant files. Then preview the site to see if this fixes the mobile menu issue. (Note: you may need to exclude multiple files in order for the menu to work)
6. While previewing the site, use the Chrome Dev Tools mobile preview mode (F12, then select the mobile icon) to view the mobile menu.
Once you've found the right combination of scripts in Script Delay or CSS Files in Remove Unused CSS, and have previewed the site, go to the next page and Activate the new Leap settings.
By following these troubleshooting steps, you should be able to resolve most issues related to mobile menu functionality.