Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Html:
- <div class="go-to-top text-center">
- <a>
- <span class="glyphicon glyphicon-arrow-up"></span>
- </a>
- </div>
- ------------------------------------------------------------------
- Css:
- .go-to-top {
- position: fixed;
- bottom: 8px;
- right: 15px;
- height: 38px;
- width: 38px;
- border: 2px #999999 solid;
- border-radius: 50%;
- line-height: 38px;
- z-index: 10;
- cursor: pointer;
- }
- -----------------------------------------------------------------
- JQuery:
- $(".go-to-top").click(function () {
- $("html,body").animate({ scrollTop: 0 }, "slow");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement