jQuery scroll top

jQuery scroll top


<html>
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<!--scroll-->
    <script type="text/javascript">
    $(function(){

$('#a1').click(function(){
            $('html,body').stop().animate({scrollTop:$('#a1').offset().top},800);
return false;
        });  
    });
    </script>
<!--scroll end-->
</head>

<body>
<a id="a1"></a>
</body>
</html>


arrow
arrow
    文章標籤
    jQuery
    全站熱搜

    jon6773 發表在 痞客邦 留言(0) 人氣()