Uncaught TypeError with jQuery and Wordpress?

后端 未结 1 1518
北荒
北荒 2021-02-11 05:17

I am having trouble on my wordpress site, my nivo slider will not load the banner images and display them.

I\'m pretty sure its to do with jquery been loaded somewhere

1条回答
  •  悲哀的现实
    2021-02-11 05:44

    The dollar sign is not an alias for jQuery on your page. Wrap the code block starting at line 467 in jquery.nivo.slider.js with a jQuery ready function setting the '$' as an alias within the function block, like this:

    jQuery(function($) {
        $(window).load(function() {
            $('#sliderNivo').nivoSlider({
                    effect:$nivo_slider_effect,
                    slices:15,
                    animSpeed:500,
                    pauseTime:$nivo_slider_speed,
                    keyboardNav:false, 
                    pauseOnHover:true
            });
        });
    });
    

    See more info on using jQuery with other libraries.

    0 讨论(0)
提交回复
热议问题