Sha256: debb3bb7dc37ec081cecf081033baea4632d1cba92c84bf169e2cdc350bb18d5
Contents?: true
Size: 1.8 KB
Versions: 52
Compression:
Stored size: 1.8 KB
Contents
(function($) { "use strict"; /* Testimonials Text Height */ setCarouselHeight('#carousel-example-generic'); function setCarouselHeight(id) { var slideHeight = []; $(id + ' .item').each(function() { // add all slide heights to an array slideHeight.push($(this).height()); }); // find the tallest item var max = Math.max.apply(null, slideHeight); // set the slide's height $(id + ' .carousel-content').each(function() { $(this).css('height', max + 'px'); }); } /* Back To Top Button */ // create the back to top button $('body').prepend('<a href="#top" class="back-to-top scrolling"><i class="fa fa-angle-up"></i></a>'); var amountScrolled = 700; $(window).scroll(function() { if ($(window).scrollTop() > amountScrolled) { $('a.back-to-top').fadeIn('500'); } else { $('a.back-to-top').fadeOut('500'); } }); /* jQuery Page Scrolling Feature */ // requires jQuery easing plugin $('a.scrolling').on('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: ($($anchor.attr('href')).offset().top - 50) }, 1250, 'easeInOutExpo'); event.preventDefault(); }); // 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').on('click', function(){ $('.navbar-toggle:visible').click(); }); // offset for main navigation $('#mainNav').affix({ offset: { top: 100 } }) })(jQuery);
Version data entries
52 entries across 52 versions & 1 rubygems