Jquery冲突,一个脚本不能与另一个脚本一起使用

时间:2013-02-22 23:42:24

标签: javascript jquery lavalamp

我有菜单的jquery脚本和其他的库,如何使它们都能工作?以下是我的代码

我对li元素也有一些扩展框问题,解释如下:

任何不适合固定宽度或高度框的内容都会导致框展开以适应内容,而不是让内容溢出。

影响:Internet Explorer 6.0 可能性:可能

还有双浮余量错误:

当一个边距应用于与浮动方向同侧的浮动框时,边距加倍。此错误仅影响一个或多个浮动行的第一个浮点数。

影响:Internet Explorer 6.0 可能性:非常可能

非常紧急,请帮助!

菜单栏的脚本

    <script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jquery.easing.min.js"></script>
<script type="text/javascript" src="../../js/jquery.lavalamp.min.js"></script>
<script type="text/javascript" src="../../js/image_fade.js"></script>
<script type="text/javascript">
    $(function() {
      $("#lava_menu").lavaLamp({
        fx: "backout",
        speed: 700
      });
    });
</script>

画廊的脚本

 <script type="text/javascript"src="../../hisasann-jStack/js/jquery.js"></script>
         <script type="text/javascript" src="../../hisasann-jStack/js/jquery.easing.1.3.js"></script>
        <script type="text/javascript" src="../../hisasann-jStack/js/jStack.js"></script>

        <!-- syntax -->
        <link rel="stylesheet" href="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" />  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shCore.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushXml.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushCss.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushPhp.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushJScript.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushCss.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushJava.js"></script>  
        <script type="text/javascript" src="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/shBrushRuby.js"></script>  
        <script type="text/javascript" charset="utf-8">
            $(function() {
                dp.SyntaxHighlighter.ClipboardSwf = 'http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Scripts/clipboard.swf';
                dp.SyntaxHighlighter.HighlightAll('code');

                // fadeInOut
                $("#logo").fadeOut().fadeIn();

                // smooth scroller
                $("a[href^=#]").click(function() {
                    var hash = this.hash;
                    if(!hash || hash == "#")
                        return false;
                    $($.browser.safari ? 'body' : 'html')
                        .animate({scrollTop: $(hash).offset().top}, 1500, "easeInOutBounce");
                    return false;
                });
            });

            var options = {
                isClickAnimation: true,
                isPositionRandom: true,
                durationOut: 300,
                durationIn: 200,
                easingOut: "easeInOutBack",
                easingIn: "easeOutBounce",
                moveLeft: 250,
                moveTop: 150,
                opacityOut: 0.6,
                opacityIn: 1,
                delay: 10,
                direction: "next",
                callback: function() {}
            };

            $(window).bind("load", function() {
                // jStack
                var jstack = $("#imageBox").jStack(options);
                $("#next").click(function() {
                    jstack.next();
                });

                $("#prev").click(function() {
                    jstack.prev();
                });
                $("#shuffle").click(function() {
                    jstack.shuffle();
                });
            });

        </script>

1 个答案:

答案 0 :(得分:0)

<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript"src="../../hisasann-jStack/js/jquery.js"></script>

如果我没有弄错,它们都是jquery库?,如果它们被加载到同一页面上它们可能会相互冲突,这个问题发生在我身上,我所做的就是删除了一个库,