Server IP : 192.64.118.117 / Your IP : 18.224.21.26 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/www/wp-content/themes/TESSERACT/js/ |
Upload File : |
(function($) { function beaverVidbg() { $('.fl-bg-video > video').each(function() { var vow = $(this).attr('data-width'), voh = $(this).attr('data-height'), vratio = parseInt( vow ) / parseInt( voh ), //.5625 pratio = parseInt( $(this).parent().width() )/ parseInt( $(this).parent().height() ); //.3248 var tc = $(this).closest('.fl-row-content-wrap'), pc = $(this).parent(); $( this ).removeAttr('style'); var tcw = $(tc).width(), tch = $(tc).height(), pcw = $(pc).width(), pch = $(pc).height(); //If top parent is narrower than the original video width if( tcw < vow ) { var nh = tch, nw = nh * vratio; //Special case: if the new video is narrower than the screen width!!! if ( nw < $(window).width() ) { var nh = tch * vratio, nw = nh * vratio; } //If top parent is wider or equal to the original video width } else { var nh = tcw/vratio, nw = $(window).width(); } $(tc).css({overflow: 'hidden', position: 'relative'}); $(pc).attr('style', 'height: ' + nh + 'px; left: 50%!important; width: ' + nw + 'px!important; margin-left: -' + nw/2 + 'px;'); $(this).attr('style', 'height: ' + nh + 'px!important;'); }) } $(window).load(function() { beaverVidbg(); }); $(window).resize(function(){ beaverVidbg(); }); })(jQuery);