jquery冲突没有在同一页面运行两个jquery [英] jquery conflict not running two jquery in same page

查看:74
本文介绍了jquery冲突没有在同一页面运行两个jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<link rel="stylesheet" href="css/form.css" type="text/css" />
<script src="js/enquire-now.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/colorbox.css" type="text/css" />
<link rel='stylesheet' href='css/style.css' />
<link href="css/Arimo.css" rel='stylesheet' type='text/css'>
<link href='css/Driod.css' rel='stylesheet' type='text/css'>
<link href='css/Cabin.css' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<!-- must have -->
<link href="css/allinone_contentSlider.css" rel="stylesheet" type="text/css">
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.ui.touch-punch.min.js" type="text/javascript"></script>
<script src="js/allinone_contentSlider.js" type="text/javascript"></script>
<!--[if IE]><script src="js/excanvas.compiled.js" type="text/javascript"></script><![endif]-->
<!-- must have -->
<script src="js/mysubmenu.js" type="text/javascript"></script>
<script src="js/floating-1.12.min.js" type="text/javascript"></script>
<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $("#contact-toggle").click(function() {
            $("#panel").slideToggle("slow");
            $(this).toggleClass("contact-active");
            return false;
        });
    });
</script>

<script>
    jQuery(function() {
        jQuery('#allinone_contentSlider_common').allinone_contentSlider({
            skin: 'common',
            width: $(window).width() - 35,
            height: 1000,
            autoHideBottomNav: false,
            showPreviewThumbs: false,
            autoHideNavArrows: false,
            thumbsWrapperMarginBottom: -50
        });
    });
</script>

我使用这段代码,上面的代码用于登录链接, b $ b灯箱弹出登录和较低的代码是用于旋转滑块转子
正在工作,但登录链接不工作我有另一个页面,我没有
滑块和我我使用相同的代码为我的登录链接,并在该页面上工作所以我
认为它是一个冲突问题,所以请给我一些建议,以解决这个问题

i am using this code the upper code is used for a login link on that i got a like lightbox a pop up for login and the lower code is used for rotating the slider the rotator is working but the login link is not working i have another page on that i dont have slider and i am using the same code for my login link and its working on that page soo i think its a conflict issue so please give me some suggestion to resolve this problem

推荐答案

使用 .noConflict()

use .noConflict()

<script  src="../jquery-1.9.1.min.js"></script> 
<script type="text/javascript">
var first= $.noConflict(true);
</script>

<!-- load jQuery 1.4.2 -->
<script type="text/javascript" src="../jquery-1.2.2.js"></script>
<script type="text/javascript">
var second= $.noConflict(true);
</script>

这篇关于jquery冲突没有在同一页面运行两个jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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