Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var _window = $(window);
- // smooth scrolling
- $("#menu").on("click","a", function (event) {
- event.preventDefault();
- var id = $(this).attr('href'),
- top = $(id).offset().top;
- $('body,html').animate({scrollTop: top}, 1500);
- });
- //arrow up from bottom right side
- _window.scroll(function() {
- if ($(this).scrollTop() > 112) $(".btn_up").fadeIn("slow");
- else $(".btn_up").fadeOut("slow");
- });
- $(".btn_up").on("click", function() {
- $("body, html").animate({
- scrollTop: 0
- }, 1000);
- });
- });
Add Comment
Please, Sign In to add comment