Jquerys之间的冲突 [英] conflict between Jquerys

查看:206
本文介绍了Jquerys之间的冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在相同的文件上做了很多jquery功能时,我遇到了问题,它不起作用。
我尝试使用de jQuery.noConflict()函数,但它不起作用(也许我没有用它以好的方式,或者我在错误的地方使用它)如何在我的noconflict函数中使用示例代码?

i have a problem when i made lot of jquery fonctions on the same file it did not work. I try to use de jQuery.noConflict() fonction but it didn't work(maybe i didn't use it in a good way or i use it in a wrong place) how can i use noconflict fonction in my example code?

<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jquery.ui.core.min.js"></script>
<script type="text/javascript" src="jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="jquery.ui.tabs.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.dataTables.js"></script>
<script type="text/javascript">
        $(document).ready(function()
        {
           var jQueryTabs1Opts =
           {
              event: 'click',
              collapsible: false
           };
           $("#jQueryTabs1").tabs(jQueryTabs1Opts);
        });

</script>

<script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#example').dataTable( {
                "aaSorting": [[ 4, "desc" ]]
            } );
        } );
</script>


推荐答案

我找到解决方案。解决方案是使用noConflict像这样的功能:

I find the solution .The solution is to use noConflict function like that :

<script>
var jq172 = jQuery.noConflict();
jq172(document).ready(function()
{
   var jQueryTabs1Opts =
   {
      event: 'click',
      collapsible: false
   };
   jq172("#jQueryTabs1").tabs(jQueryTabs1Opts);
}); 
</script>

这篇关于Jquerys之间的冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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