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
|
|
|
|
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
|
|
|
|
$('.navbar-toggle:visible').click();
|
|
|
|
});
|
|
|
|
|
|
|
|
// 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
|