Cleanup creative JS
This commit is contained in:
parent
169635a432
commit
04d307d696
3 changed files with 6 additions and 16 deletions
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import 'jquery.easing';
|
||||
import './creative';
|
||||
|
||||
import WOW from 'wow.js';
|
||||
|
||||
new WOW().init();
|
||||
|
|
Reference in a new issue