一起素材吧 关注:1,574贴子:877
  • 6回复贴,共1

怎么同时使用两个不同的JS插件?

只看楼主收藏回复

我下载了两个JS插件,单独使用时没有问题,两个一起用时第二个就没反应了,求高手指教
第一个
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery插件页面滚动返回顶部按钮</title>
<meta name="description" content="jQuery插件制作页面滚动后出现返回顶部按钮,可以设置返回顶部按钮的位置,且可以设置滚动到指定位置等。" />
</head>
<body>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/scrolltopcontrol.js"></script>
<div style="height:1000px;"></div>
</body>
第二个
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>页面悬浮jQuery在线客服 </title>
<style>
/*mess*/
* { font-size:13px; font-family:Georgia, "Times New Roman","瀹嬩綋"; color:#333; margin:0; padding:0; list-style:none; text-shadow:0 1px 1px #fff; }
html {background:url(bg.png) repeat; }
a img { border:0;}
.demoTitle { text-align:center; font-size:30px; font-weight:bold; color:#c00; text-shadow:1px 1px 0 #fff; margin:60px 0 40px; border-bottom:1px dashed #999;border-top:1px dashed #999; padding:20px 0; background:#EEE; }
#psWraper { background:#eee; padding:10px 0; margin-top:80px; border-top:1px dashed #999; }
#psText { padding-bottom:10px; margin-bottom:20px; border-bottom:1px dashed #bebebe; }
#psText samp { font-weight:bold; font-size:14px; letter-spacing:0.1em; }
#psText samp a { color:#06F;letter-spacing:0.1em; }
#psText h2 { font-size:20px; margin:10px auto; }
#psText p { padding:10px 0; line-height:25px; letter-spacing:0.1em; }
#psText ul { margin:10px auto; }
#psText ul li { line-height:25px; line-height:25px; letter-spacing:0.1em; }
#ps { width:600px; margin:0 auto; padding:30px 0; }
#ps h1 { padding-bottom:20px; text-shadow:1px 1px 0 #fff; color:#c00; font-size:23px; font-weight:bold; }
#ps h2 { line-height:20px; text-shadow:1px 1px 0 #fff; padding:10px 0; }
#ps h1 p { display:inline; font-size:16px; font-weight:bold; color:#666; margin-left:20px; }
#ps dl { padding-left:0; padding-bottom:40px; }
#ps dl dt,#ps dl dd { height:30px; line-height:30px; font-size:13px; text-shadow:1px 1px 0 #fff; }
#ps dl dt { padding-left:10px; }
#ps dl dd { color:#ff6600; text-shadow:1px 1px 0 #fff; }
#ps dl dd span {color:#900; margin-right:50px; letter-spacing:0.01em; padding-left:10px;}
/* 客服代码CSS */
body,ul,ol,h2,h3,h4,h5,p,dl,dt,dd,form{padding:0;margin:0;}
img{border:none;}
li{list-style:none;}
a{text-decoration:none;outline:none;color:#666666;}
a:hover{text-decoration:none}
img{border:0}
ul{list-style:none;margin:0;}
label{color:#6CBD45;font-size:14px;font-weight:bold;padding-bottom:0.5em;margin:0;}
.h3{font-size:13px;font-weight:bold;}
.jcContact{position:absolute;top:0;left:0;z-index:99;width:215px;}
.jcConraper{width:174px;background:url(images/c03.png) repeat-y 0 0;overflow:hidden;}
.jcConBtn{background:url(images/c01.png) no-repeat;position:absolute;top:0;left:0;width:41px;height:116px;cursor:pointer;}
</style>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="js/jQuery-jcContact.js" type="text/javascript"></script>
<script>
$(function(){
$(*#demo1*).jcContact();
$(*#demo2*).jcContact({
speed:700,
position:*top*,
posOffsetY : 50,
btnPosition : *top*,
btnPosoffsetY : 44 ,
float:*right*,
Event : "mouseover"
});
$(*#demo3*).jcContact({
speed:400,
position:*bottom*,
posOffsetY : -100,
btnPosition : *top*,
btnPosoffsetY : 44 ,
float:*right*,
Event : "click"
});
});
</script>
</head>
<body>
<div id="demo3" class="jcContact">
<div class="jcConraper">
<!-- 自定义部分 -->
<div style=" background:url(images/c02.png) no-repeat 0 0; height:44px;"></div>
<ul>
<li style="font-size:20px; text-align:center; font-weight:bold; color:#ff6600; padding:15px 0 5px;">000-12345678</li>
<li style="background:url(images/c04.png) no-repeat center 0; height:140px;"></li>
</ul>
<div style="background:url(images/c05.png) no-repeat 0 0; height:11px;"></div>
<div style="line-height:22px; padding:5px 18px 25px;">
<span style="display:block; float:left; height:22px; line-height:22px; font-size:13px; font-weight:bold; color:#555555;">站长素材</span>
<a href="tencent://message/?uin=80107540" style="display:block; float:right; width:74px; height:22px; background:red; "><img src="images/c06.png" height="22" width="74" border="0" /></a>
<div class="clear"></div>
</div>
<div style="background:url(images/c07.png) no-repeat; height:13px;"></div>
<!-- 自定义部分 结束 -->
</div>
<div class="jcConBtn"></div>
</div>
<div style="height:1000px;"></div>
</body>


1楼2014-10-11 20:32回复
    么人???


    2楼2014-10-11 22:25
    回复
      还真没遇到过,插件坑爹,还不如自己写


      IP属地:湖北3楼2014-10-14 15:31
      回复
        在逗我们么?JQ的链接都不给,还能好好的帮你测试吗?
        <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>这2个都是一样的,用一个就够了;
        position:*bottom*,这用法也是错的,应该这样:position:“bottom”,


        4楼2014-10-24 11:27
        回复
          路过。··


          5楼2014-10-24 16:09
          回复
            jquery版本不一样,内容都是一样的,有相同的就会有冲突,只要去掉低版本,引用高版本就行了 1.4.2.js跟1.8.3.js 只需要用1.8.3的就行


            6楼2014-11-21 10:19
            回复
              牛的发动机该公司将


              7楼2014-11-24 15:00
              回复