【问题标题】:How to fix jQuery conflict?如何解决 jQuery 冲突?
【发布时间】:2011-06-21 08:42:58
【问题描述】:

我在 magento 中使用了 3 个以上的 javascript,我尝试修复一些脚本(我认为是冲突)并且它可以工作,但是最后一个 jquery (jcarousel) 如果我单击新到的标签和大多数,它可以交换到另一个类别流行但现在它不起作用..但是如果我注释掉手风琴 js 文件它可以工作但手风琴不能工作.. :(

点击这里:http://thaiamuletstore.com/main1/index.php

head.phtml


<?php echo $this->getCssJsHtml() ?>
<?php echo $this->getChildHtml() ?>


<link href="http://thaiamuletstore.com/main1/style/tabs.css" rel="stylesheet" type="text/css">
<link href="http://thaiamuletstore.com/main1/style/tabs.css" rel="stylesheet" type="text/css">
<link href="http://thaiamuletstore.com/main1/style/tango/skin.css" rel="stylesheet" type="text/css" />



<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/jquery.min.js"></script>



<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/Untlitie.js"></script>                           <!-- this-control-jcarousel-->

<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/470fe3190c7d0ea4aacc14677c226000.js"></script>   <!--this-control-Accordion-->

<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/jquery.jcarousel.min.js"></script>               <!-- this-control-jcarousel-->




<!--[if lt IE 8]>
<link rel="stylesheet" href="http://thaiamuletstore.com/main1/style/ie.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->





<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/hoverIntent.js"></script>

<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/superfish.js"></script>

<script type="text/javascript" src="http://thaiamuletstore.com/main1/js/organictabs.jquery.js"></script>

<script src=http://thaiamuletstore.com/main1/js/menu_effect/script.js" type="text/javascript"></script>

【问题讨论】:

    标签: javascript php jquery html javascript-events


    【解决方案1】:
    jQuery.noConflict();
    

    这是你的救命稻草。

    【讨论】:

    • 是的..我尝试放入头
    • 您需要检查您是否尝试在具有相同IDS的不同DOM元素上调用JS函数......
    • 但是有些浏览器可以正常工作,但有些浏览器却不行……为什么会这样?你可以看到与 Mozilla 和 ie7 的不同
    猜你喜欢
    • 1970-01-01
    • 2023-03-30
    • 2014-10-19
    • 2012-11-20
    • 1970-01-01
    • 2012-07-20
    • 2019-02-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多