creative.js (1271B)
1 /*! 2 * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) 3 * Code licensed under the Apache License v2.0. 4 * For details, see http://www.apache.org/licenses/LICENSE-2.0. 5 */ 6 7 (function($) { 8 "use strict"; // Start of use strict 9 10 // jQuery for page scrolling feature - requires jQuery Easing plugin 11 $('a.page-scroll').bind('click', function(event) { 12 var $anchor = $(this); 13 $('html, body').stop().animate({ 14 scrollTop: ($($anchor.attr('href')).offset().top - 50) 15 }, 1250, 'easeInOutExpo'); 16 event.preventDefault(); 17 }); 18 19 // Highlight the top nav as scrolling occurs 20 $('body').scrollspy({ 21 target: '.navbar-fixed-top', 22 offset: 51 23 }) 24 25 // Closes the Responsive Menu on Menu Item Click 26 $('.navbar-collapse ul li a').click(function() { 27 $('.navbar-toggle:visible').click(); 28 }); 29 30 // Fit Text Plugin for Main Header 31 $("h1").fitText( 32 1.2, { 33 minFontSize: '35px', 34 maxFontSize: '65px' 35 } 36 ); 37 38 // Offset for Main Navigation 39 $('#mainNav').affix({ 40 offset: { 41 top: 100 42 } 43 }) 44 45 // Initialize WOW.js Scrolling Animations 46 new WOW().init(); 47 48 })(jQuery); // End of use strict