返回顶部的jquery插件

 

Easy Peasy

Download the minified version of the plugin, include it after jQuery and:

<script> jQuery(document).ready(function(){ jQuery.goup(); }); </script> 带参数的:点击下载此文件 
<script type="text/javascript">
        $(document).ready(function () {
            $.goup({
                trigger: 100,
                bottomOffset: 50,
                locationOffset: 70,
containerColor: '#990000',
                title: '返回顶部',
                titleAsText: false
            });
        });
    </script>

Demo

Yeah! You can see it in action on this page. If you scroll down, you can see, on the bottom right, the magic!

Options

Name Description Type Default
location On which side the button will be shown ("left" or "right") String right
locationOffset How many pixel the button is distant from the edge of the screen, based on the location setted Integer 20
bottomOffset How many pixel the button is distant from the bottom edge of the screen Integer 10
containerRadius Let you transform a square in a circle (yeah, it's magic!) Integer 10
containerClass The class name given to the button container String goup-container
arrowClass The class name given to the arrow container String goup-arrow
containerColor The color of the container (in hex format) String #000
arrowColor The color of the arrow (in hex format) String #fff
trigger After hoiw many scrolled down pixels the button must be shown (bypoassed by alwaysVisible) Integer 500
entryAnimation The animation of the show and hide events of the button ("slide" or "fade") String fade
alwaysVisible Set to true if u want the button to be always visible (bypass trigger) Boolean false
goupSpeed The speed at which the user will be brought back to the top ("slow", "normal" or "fast") String slow
hideUnderWidth The threshold of window width under which the button is permanently hidden Integer 500
title A text to show on the button mouse hover String ''
titleAsText If true the hover title becomes a true text under the button Boolean false
titleAsTextClass The class name given to the title text String goup-text
zIndex Set the z-index Integer 1

 点击下载



[本日志由 admin 于 2020-02-16 07:34 PM 更新]
上一篇: Chrome浏览器提示ssl不够安全
下一篇: centos lnmp重置mysql数据库root密码
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: javascript jquery
相关日志:
评论: 0 | 引用: 0 | 查看次数: 355
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 邮件地址支持Gravatar头像,邮箱地址不会公开.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭

 广告位

↑返回顶部↑