【问题标题】:How to include both of `jquery.tools.js` and `jquery.tokeninput.js` [duplicate]如何同时包含`jquery.tools.js`和`jquery.tokeninput.js` [重复]
【发布时间】:2011-12-27 17:49:56
【问题描述】:

可能重复:
Can JQuery UI and JQuery tools work together?

我有一个页面需要 JQuery 的 tokeninput(用于下拉菜单)以及 JQuery 的“工具”(用于工具提示等)

如果我这样做

<script type="text/javascript" src="jquery.tools.js"></script>
<script type="text/javascript" src="jquery.tokeninput.js"></script>

然后 Chrome 给我错误:

Uncaught TypeError: Object function (a,b){return new c.fn.init(a,b)} 
has no method 'type'    (jquery.tokeninput.js:139)

如果我把 JS 调用反过来,那么一切都会加载,但 tokeninput 方法在文本字段上不可用。

如果我只有jquery.tokeninput.js 文件,那么tokeninput 运行良好,一切正常,除了jquery.tools.js 中介绍的功能不可用,例如tooltip

仅供参考:我包含的整个脚本列表是:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery-1.8.10-redmond/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="jquery.tools.js"></script>
<script type="text/javascript" src="jquery.tokeninput.js"></script>
<script type="text/javascript" src="jquery.colorbox.js"></script>
<script type="text/javascript" src="jquery.fileinput.js"></script>

【问题讨论】:

    标签: jquery jquery-ui jquery-tools jquery-tokeninput


    【解决方案1】:

    好的,答案似乎在这里:

    https://stackoverflow.com/a/1721944/220627

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-23
      • 2013-04-14
      • 2014-01-22
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多