2016-06-24 22:55:33 +02:00
|
|
|
// Agency Theme JavaScript
|
|
|
|
|
2016-06-22 21:35:40 +02:00
|
|
|
(function($) {
|
|
|
|
"use strict"; // Start of use strict
|
|
|
|
|
|
|
|
// jQuery for page scrolling feature - requires jQuery Easing plugin
|
2014-08-13 03:01:38 +02:00
|
|
|
$('a.page-scroll').bind('click', function(event) {
|
|
|
|
var $anchor = $(this);
|
|
|
|
$('html, body').stop().animate({
|
2016-06-22 21:35:40 +02:00
|
|
|
scrollTop: ($($anchor.attr('href')).offset().top - 50)
|
|
|
|
}, 1250, 'easeInOutExpo');
|
2014-08-13 03:01:38 +02:00
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
|
2016-06-22 21:35:40 +02:00
|
|
|
// Highlight the top nav as scrolling occurs
|
|
|
|
$('body').scrollspy({
|
|
|
|
target: '.navbar-fixed-top',
|
|
|
|
offset: 51
|
|
|
|
});
|
|
|
|
|
|
|
|
// Closes the Responsive Menu on Menu Item Click
|
2016-08-05 18:12:45 +02:00
|
|
|
$('.navbar-collapse ul li a').click(function(){
|
|
|
|
$('.navbar-toggle:visible').click();
|
2016-06-22 21:35:40 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
// Offset for Main Navigation
|
|
|
|
$('#mainNav').affix({
|
|
|
|
offset: {
|
|
|
|
top: 100
|
|
|
|
}
|
|
|
|
})
|
2014-08-13 03:01:38 +02:00
|
|
|
|
2016-06-22 21:35:40 +02:00
|
|
|
})(jQuery); // End of use strict
|