sirk-c
6/9/2015 - 3:52 PM

Scale video wrapper

Scale video wrapper

/*
    adjust video wrapper heights on the fly based on wrapper width
    */
    function setWrapHeight() {
        var wrapWidth =  $('.home #intro-video').width();
        var wrapHeight = Math.round((wrapWidth/16)*9);
        $('.home #intro-video').css('height',wrapHeight + 'px');
    }
    setWrapHeight();

    $(window).resize(function() {
        setWrapHeight();
    });