Flexslider stopped working. Firebug shows TypeError: $(…).flexslider is not a function

99封情书 提交于 2019-12-25 03:45:29

问题


I'm developing a single page wordpress website for our client. In that i have used flexslider in header section and some other jquery plugins. All of them were working till today morning but now I found that the flexslider stopped working.
I'm not able to find out the reason. Please help me to solve this issue as I have to submit this project today.

Error Found on Firebug Console: TypeError: $(...).flexslider is not a function
animation: "slide"
- /Demo/website/ (line 34)


How can i fix this? Any help will be appreciated..

Thanks in advance..


回答1:


The jquery.flexslider.js is not loading. Try removing the defer keyword from or add type="text/javascript" and see if it works. Your current source:

<script defer src="http://www.yourwebsite.com/Demo/allabout/wp-content/themes/twentytwelve/js/jquery.flexslider.js"></script>

I suggest you try

<script type="text/javascript" src="http://www.yourwebsite.com/Demo/allabout/wp-content/themes/twentytwelve/js/jquery.flexslider.js"></script>



回答2:


Try this.. hope this will work.

(function($) {
$(window).load(function(){
$('.flexslider').flexslider({
--------- YOUR CONFIGURATIONS --------
});
});
})(jQuery);


来源:https://stackoverflow.com/questions/15103424/flexslider-stopped-working-firebug-shows-typeerror-flexslider-is-not-a

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