Jquery error disabling header navigation

I have an error on one of my pages that disables the collapsed menu and off canvas cart, but standard links work fine.

Uncaught TypeError: jQuery(…).slider is not a function
at HTMLDocument. (main.js:762)
at l (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.A (jquery.js:2)

Line 762:
jQuery(".slider-100").slider({value:20,min: 0,max: 100,step: 1,
change: function (event, ui) { callevent(); },slide: function(event, ui) {
jQuery("#"+jQuery(this).attr(“target”)).val(ui.value);
}

Hi There,

You need to enqueue the jQuery UI slider library.

Please add the following code under functions.php file locates in your child theme:

function x_theme_name_scripts() {
    wp_enqueue_script( 'jquery-ui-slider' );
}
add_action( 'wp_enqueue_scripts', 'x_theme_name_scripts' );

Let us know how it goes!

That still did not work

Hi there,

Would you mind providing a sample URL that has this issue? Maybe it’s referring to a different library.

Thanks!

caroldeltoro.com

Hello There,

It seems that the url is under construction or just displays a landing page. Could you please provide us access?

Meanwhile, since you are using SiteGround, could you please disable the supercacher in your hosting panel? The SuperCacher is developed by SiteGround exclusively for their customers. It increases the number of hits a site can handle and boosts the website loading speed. The SuperCacher includes 4 different caching options for maximum optimization of your websites. You can access the tool by clicking on the SuperCacher icon in your cPanel.

For more information about this, please check it out here: https://www.siteground.com/tutorials/supercacher/supercacher_intro.htm

Hope this helps.

The site is live now, you can view it at https://www.caroldeltoro.com/

Hi there,

I have just checked your site an the menu seems to be opening fine without an issue.

I have checked the console as well and there is no JQuery error.

Please try to clear your cache.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.