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(); + }); +});