creative.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. (function($) {
  7. "use strict"; // Start of use strict
  8. // jQuery for page scrolling feature - requires jQuery Easing plugin
  9. $('a.page-scroll').bind('click', function(event) {
  10. var $anchor = $(this);
  11. $('html, body').stop().animate({
  12. scrollTop: ($($anchor.attr('href')).offset().top - 50)
  13. }, 750, 'easeInOutExpo');
  14. event.preventDefault();
  15. });
  16. // Highlight the top nav as scrolling occurs
  17. $('body').scrollspy({
  18. target: '.navbar-fixed-top',
  19. offset: 51
  20. })
  21. // Closes the Responsive Menu on Menu Item Click
  22. $('.navbar-collapse ul li a').click(function() {
  23. $('.navbar-toggle:visible').click();
  24. });
  25. // Fit Text Plugin for Main Header
  26. $("h1").fitText(
  27. 1.2, {
  28. minFontSize: '35px',
  29. maxFontSize: '65px'
  30. }
  31. );
  32. // Offset for Main Navigation
  33. $('#mainNav').affix({
  34. offset: {
  35. top: 100
  36. }
  37. })
  38. // Initialize WOW.js Scrolling Animations
  39. new WOW().init();
  40. })(jQuery); // End of use strict