jquery回到顶部插件GoUP

html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>jquery回到顶部插件goUp</title>    
<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="js/jquery.goup.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>  
</head>

<body>
<center>
<br>
<p><font color="#FF0000" size="7">往下拉</font></p><br><br>
<p>适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.</p>
</center>
<div style="text-align:center;margin:2000px 0;"></div>
    
<!--GoUP DIV-->
<div id="goup"></div>

</body>
</html>

 

js:

// GoUP - a scroll-to-top jQuery plugin deeveloped by Roger Vila (@_rogervila) //

$(document).ready(function () {
    
    //////GoUP/////////
    $(‘#goup‘).goup();
    ///////////////////
    
    
    //example of changing default values
    
    /*
    $(‘#goup‘).goup({
        width: "100px",
        scrolltime: 3000,
        appear: 800,
        imgsrc: ‘https://cdn1.iconfinder.com/data/icons/ose/Arrow%20Up.png‘,
        place: "top-left",
        fadein: 3000,
        fadeout: 5000,
        opacity: "0.1"
        }
    );
    */
    
    
    //the rest of the script doesn‘t begin to the GoUP plugin, it‘s just for the web design
    var h = $(window).height();
    $(‘#scroll a‘).click(function () {
        $("html, body").animate({ scrollTop: h }, 900);
        return false;
    });
    $(‘#divheader‘).height(h);
    
    var h6 = parseInt(h / 6);
    $(‘#title‘).height(h6);
    $(‘#twitter‘).height(h6);
    $(‘#downloadbuttons‘).height(h6);
    $(‘#scroll‘).height(h6);
});

jquery-1.6.4.min.js+jquery.goup.min.js

demo:

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。