$(“。selector”).tabs(“refresh”)的替代品;在jquery 1.5.2中

时间:2013-10-28 09:30:25

标签: jquery jquery-ui

我正在尝试动态添加和删除标签,就像这样 jquery dynamic tabs除了我以外  使用jquery 1.5.2。但是一个接一个地添加了选项卡面板(div标签)。我发现问题在于更新版本的jquery中添加的刷新调用。我在阅读thisthis后尝试使用tabify。但我得到一个错误说

Uncaught TypeError: Object [object Object] has no method 'tabify'

那么还有其他选择吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试使用此功能。

 Be ABSOLUTELY sure your script is being pulled into the page, one way to check is by using the 'sources' tab in the Chrome Debugger and searching for the file.

    Be sure that you've included the script after you've included jQuery, as it is most certainly dependant upon that.

除此之外,我检查了API,你肯定做的一切都是我能看到的。祝你好运!

编辑:确保关闭脚本标记。下面的答案指出了解决方案。

优先顺序必须如下:

jQuery.js
Everything that depends on jQuery.

看起来你错了(在问题中查看你的代码)。将其更改为:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.timepicker.min.js"></script>