From 15159639b781756b39eea343d563d082b4af6f4a Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 11 Nov 2014 22:27:42 +0200 Subject: [PATCH] Initial Commit --- index.html | 1 + js/minecraft.js | 10 +--------- js/minecraft.js~ | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 js/minecraft.js~ diff --git a/index.html b/index.html index 7a4446c..7be2662 100644 --- a/index.html +++ b/index.html @@ -31,5 +31,6 @@ + \ No newline at end of file diff --git a/js/minecraft.js b/js/minecraft.js index 67d8906..02c9a6b 100644 --- a/js/minecraft.js +++ b/js/minecraft.js @@ -1,11 +1,3 @@ -$(window).scroll(function() { - if ($(".navbar").offset().top > 50) { - $(".navbar-fixed-top").addClass("top-nav-collapse"); - } else { - $(".navbar-fixed-top").removeClass("top-nav-collapse"); - } -}); - $(function() { $('.page-scroll a').bind('click', function(event) { var $anchor = $(this); @@ -14,4 +6,4 @@ $(function() { }, 1500, 'easeInOutExpo'); event.preventDefault(); }); -}); +}); \ No newline at end of file diff --git a/js/minecraft.js~ b/js/minecraft.js~ new file mode 100644 index 0000000..67d8906 --- /dev/null +++ b/js/minecraft.js~ @@ -0,0 +1,17 @@ +$(window).scroll(function() { + if ($(".navbar").offset().top > 50) { + $(".navbar-fixed-top").addClass("top-nav-collapse"); + } else { + $(".navbar-fixed-top").removeClass("top-nav-collapse"); + } +}); + +$(function() { + $('.page-scroll a').bind('click', function(event) { + var $anchor = $(this); + $('html, body').stop().animate({ + scrollTop: $($anchor.attr('href')).offset().top + }, 1500, 'easeInOutExpo'); + event.preventDefault(); + }); +});