Uncaught TypeError with jQuery and Wordpress?

心不动则不痛 提交于 2019-12-04 14:27:21

问题


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 else, but i just dont know.

Could some one look at my website, css-signs.ie and inspect the error

here is the error

Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function

回答1:


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.



来源:https://stackoverflow.com/questions/8272939/uncaught-typeerror-with-jquery-and-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!