0
我的网站上有一个jQuery滑块。如果我添加任何其他jQuery,比如说我想要滚动到顶层功能,并且包含它,滚动到顶端的作品,但滑块停止工作。为什么?我的网站上有一个jQuery滑块。添加其他jQuery幻灯片禁用jquery滑块
这是网站:www.placementor.blogspot.com。我使用的代码是:
HTML:
<a href="#" class="scrollup">Scroll</a>
的Javascript:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.scrollup').fadeIn();
} else {
$('.scrollup').fadeOut();
}
});
$('.scrollup').click(function(){
$("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
});
CSS:
.scrollup{
width:40px;
height:40px;
opacity:0.3;
position:fixed;
bottom:50px;
right:100px;
display:none;
text-indent:-9999px;
background: url('icon_top.png') no-repeat;
}
我试图消除:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
认为这将是多余的,因为滑块可能正在使用某个插件并导致冲突。但不,它仍然无法工作。帮我解决这个问题。