Plugin not loading

穿精又带淫゛_ 提交于 2019-12-02 13:30:15

问题


This is driving me nuts. I checked and rewrote the code many times and it still doesn't work. Here it is: http://codepen.io/cwf/pen/zGBmgm

Although tablesorter.js is loaded, $.tablesorter is undefined. I read all the questions here and can't find the problem, let alone the solution... Must be a little detail but I exhausted all options. Can anybody please have a quick look?

Thanks!


回答1:


jQuery was being loaded twice in that codepen... (updated demo)

In the <head> jquery v2.1.4 is being loaded, and at the bottom of the document, next to where Bootstrap scripts are loaded, jQuery v1.11.2 is loaded.

When jQuery is loaded twice, any scripts that are loaded between to the two versions will be associated with the first copy of jQuery & any loaded scripts. The second copy of jQuery will overwrite the first unless noConflict() is used; but it is kind of silly to run two versions of jQuery on the same page.



来源:https://stackoverflow.com/questions/30323408/plugin-not-loading

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