diff --git a/package.json b/package.json index 506bb28..3c7d191 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "bootstrap-sass": "=3.3.7", "font-awesome": "=4.6.3", "jquery": "=2.2.3", - "jquery.easing": "=1.3.2", "underscore": "=1.8.3", "wow.js": "=1.2.0" }, diff --git a/static/src/js/creative/creative.js b/static/src/js/creative/creative.js index da1676c..08373b0 100644 --- a/static/src/js/creative/creative.js +++ b/static/src/js/creative/creative.js @@ -2,17 +2,18 @@ * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. + * (Edited for theorangeone.net) */ -// jQuery for page scrolling feature - requires jQuery Easing plugin +const NAVBAR_HEIGHT = $('#main-nav').height(); + $('a.page-scroll').bind('click', function(event) { const anchor = $(this); $('html, body').stop().animate( { - scrollTop: ($(anchor.attr('href')).offset().top - 50) + scrollTop: ($(anchor.attr('href')).offset().top - NAVBAR_HEIGHT) }, - 1250, - 'easeInOutExpo' + 750 ); event.preventDefault(); }); @@ -20,18 +21,10 @@ $('a.page-scroll').bind('click', function(event) { // Highlight the top nav as scrolling occurs $('body').scrollspy({ target: '.navbar-fixed-top', - offset: 51 + offset: NAVBAR_HEIGHT + 1 }); // Closes the Responsive Menu on Menu Item Click $('.navbar-collapse ul li a').click(function() { $('.navbar-toggle:visible').click(); }); - - -// Offset for Main Navigation -$('#main-nav').affix({ - offset: { - top: 50 - } -}); diff --git a/static/src/js/creative/index.js b/static/src/js/creative/index.js index 43b0721..0df842a 100644 --- a/static/src/js/creative/index.js +++ b/static/src/js/creative/index.js @@ -1,6 +1,4 @@ -import 'jquery.easing'; import './creative'; - import WOW from 'wow.js'; new WOW().init();