Skip to content

Instantly share code, notes, and snippets.

@elfcobe elfcobe/user_hatena.htm
Last active Jan 2, 2016

What would you like to do?
<script type="text/javascript" src="">
$(function() {
var topBtn = $('#page-top');
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
else { topBtn.fadeOut();
//スクロールしてトップ () {
scrollTop: 0}, 500);
return false;
#page-top {
position: fixed;
bottom: 20px;
right: 20px;
font-size: 77%;
#page-top a {
background: #666;
text-decoration: none;
color: #fff;/*文字色*/
width: 100px;
padding: 30px 0;
text-align: center;
display: block;
border-radius: 5px;
#page-top a:hover {
text-decoration: none;
background: #999;
<p id="page-top"><a href="#grobalheader-container">⇧ PAGE TOP</a></p>

This comment has been minimized.

Copy link
Owner Author

elfcobe commented Jan 8, 2014


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.