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

Version Path
wbase-0.3.20 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.19 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.18 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.17 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.16 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.15 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.14 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.13 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.12 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.11 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.10 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.9 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.8 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.7 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.6 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.5 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.4 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.3 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.2 app/assets/javascripts/wbase/landing/scripts.js
wbase-0.3.1 app/assets/javascripts/wbase/landing/scripts.js