Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在以下站点上,内容滑块不起作用。我在许多其他网站上使用过这个内容滑块。这个网站正在使用 Twitter Bootstrap(我不熟悉)。
控制台错误是:
Uncaught TypeError: Object [object Object] has no method 'slides'
我是 JavaScript 新手,所以我不确定要寻找什么。我明白错误在说什么,但我不明白为什么我在这个网站上而不是在其他网站上得到它,或者从哪里开始寻找。我究竟做错了什么?
您正在加载 jQuery 3 次。第一次,您正在加载它,然后加载幻灯片插件。
第二次加载 jQuery,它取代了第一次,以及所有插件。
您只需要在页面顶部加载一次 jQuery。