Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

html - jquery conflict not running two jquery in same page

<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>

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...