jquery ui无法完全正常运行(稳定的"jquery-ui-1.8.16.custom.min.js") [英] jquery ui not working completely (stable "jquery-ui-1.8.16.custom.min.js")

查看:104
本文介绍了jquery ui无法完全正常运行(稳定的"jquery-ui-1.8.16.custom.min.js")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

终于知道了!我没有加载css!愚蠢的我...感谢您帮助我解决其他问题!

Finally got it! I didn't have the css loaded!! silly me... thanks for helping me with the other issues!

我在本地使用红宝石.

尝试使用"jquery-ui-1.8.16.custom.min.js"& "jquery-1.6.2.min.js"

attempting to work with "jquery-ui-1.8.16.custom.min.js" & "jquery-1.6.2.min.js"

我能够使jQuery ui手风琴"正常工作..但是标签"不起作用!!!

i was able to get jQuery ui "accordion" to work just fine.. but "tabs" will not work!!!

我已经检查了文件是否在正确的位置正确调用了...

I've check that files are called properly and in the correct locations...

<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js">
<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js">

firebug显示以下3个错误(试图使用jquery ui"tabs"):

firebug shows the following 3 errors (attempting to use jquery ui "tabs"):

jQuery is not defined
[Break On This Error] c.ui.isOverAxis(b,e,i)}})}})(jQuery);


jquery...4700986 (line 18)
element.dispatchEvent is not a function
[Break On This Error] element.dispatchEvent(event);


protot...4640791 (line 5653)
$("#tabs").tabs is not a function
[Break On This Error] $( "#tabs" ).tabs(); 

这些错误告诉我我刚刚从其稳定"链接下载的jQuery UI lib出了问题....是这种情况还是在发生其他情况?

these errors tell me something is wrong with the jQuery UI lib I just downloaded from their "stable" link.... Is that the case or is something else going on here?

谢谢!

更改库的顺序后,我可以将其降低到1个错误(原型库错误)....

After changing the order of my libs I was able to get it down to 1 error (error with prototype lib)....

element.dispatchEvent is not a function

[中断此错误] element.dispatchEvent(event);

[Break On This Error] element.dispatchEvent(event);

下面是一个更新,其中包含我的标签html和js ...

below is an update which contains my tabs html and js...

<div id="tabs">
<ul>
    <li><a href="#tabs-1">tab1</a></li>
    <li><a href="#tabs-2">tab2</a></li>
    <li><a href="#tabs-3">tab3</a></li>
</ul>
<div id="tabs-1">
    <p>tab1 content</p>
</div>
<div id="tabs-2">
    <p>tab2 content</p>
</div>
<div id="tabs-3">
    <p>tab3 content</p>
</div>
    </div>

jQuery:

$(document).ready(function(){


$( "#tabs" ).tabs();

});

当我将".tabs()"替换为".hide()"时,tabs元素确实隐藏了...

and when I replace the ".tabs()" with ".hide()" the tabs element does hide properly...

我在做什么错了?

我还尝试了以下JS的noConflict模式:

I also tried noConflict mode with the following JS:

 jQuery(document).ready(function(){
 var $j = jQuery.noConflict();

  $j( "#tabs" ).tabs();

 });

相同的问题...

推荐答案

您的错误:

未定义jQuery

jQuery is not defined

这表示:您的<script>标记顺序错误.

This translates to: your <script> tags are in the wrong order.

jQuery应该在jQuery UI之前加载:

jQuery should load before jQuery UI:

<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js">
<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js">

这篇关于jquery ui无法完全正常运行(稳定的"jquery-ui-1.8.16.custom.min.js")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆