nunta/js/agency.min.js

7 lines
920 B
JavaScript
Raw Normal View History

/*!
2017-10-20 05:04:53 +02:00
* Start Bootstrap - Agency v4.0.0-beta.2 (https://startbootstrap.com/template-overviews/agency)
2017-01-18 22:32:37 +01:00
* Copyright 2013-2017 Start Bootstrap
2017-03-31 23:58:28 +02:00
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-agency/blob/master/LICENSE)
*/
2017-09-27 07:29:31 +02:00
(function(b){b('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var c=b(this.hash);c=c.length?c:b("[name="+this.hash.slice(1)+"]");if(c.length){b("html, body").animate({scrollTop:(c.offset().top-54)},1000,"easeInOutExpo");return false}}});b(".js-scroll-trigger").click(function(){b(".navbar-collapse").collapse("hide")});b("body").scrollspy({target:"#mainNav",offset:54});var a=function(){if(b("#mainNav").offset().top>100){b("#mainNav").addClass("navbar-shrink")}else{b("#mainNav").removeClass("navbar-shrink")}};a();b(window).scroll(a)})(jQuery);