0

我正在使用 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>
4

0 回答 0