我正在使用JQuery Scroll Top自动向上和向下滚动。目前,当我点击“联系人”时,它并没有走到底部,而是有点蹒跚而行。任何人都有任何想法,为什么会这样? 链接在这里: http://computerwebservices.net/creative/
<div id ="header">
<div class ="scrollBg"><img src="images/creativefolio.png" /></div>
<div id ="menu">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#portbox">Portfolio</a></li>
<li><a href="#resume">Resume</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--end of menu holder -->
</div><!--end of header holder -->
</div><!--end of header case -->
<script type="text/javascript">
$(function() {
$('#menu ul a').bind('click',function(event){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500,'easeInOutExpo');
/*
if you don't want to use the easing effects:
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1000);
*/
event.preventDefault();
});
});
</script>
<script>
$(document).ready(function(){
$(window).scroll(function () {
$('#headercase').css('top', $(document).scrollTop());
});
});
</script>