Server IP : 104.21.14.48 / Your IP : 18.222.21.85 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/themes/sammy/assets/js/elementor/ |
Upload File : |
(function($){ "use strict"; $(window).on('elementor/frontend/init', function () { elementorFrontend.hooks.addAction('frontend/element_ready/podover_elementor_video.default', function(){ $('.ova-video').each( function() { var that = $(this); var video_active = that.find('.video_active'); var modal_container = that.find('.modal-container'); var modal_close = that.find('.ovaicon-cancel'); var modal_video = that.find('.modal-video'); // btn video click video_active.on( 'click', function() { var btn_video = $(this).find('.video-btn') var url = get_url( btn_video.data('src') ); var autoplay = btn_video.data('autoplay'); var mute = btn_video.data('mute'); var loop = btn_video.data('loop'); var controls = btn_video.data('controls'); var modest = btn_video.data('modest'); var showinfo = btn_video.data('show_info'); var option = '?'; option += ( 'yes' == autoplay ) ? 'autoplay=1' : 'autoplay=0'; option += ( 'yes' == mute ) ? '&mute=1' : '&mute=0'; option += ( 'yes' == loop ) ? '&loop=1' : '&loop=0'; option += ( 'yes' == controls ) ? '&controls=1' : '&controls=0'; option += ( 'yes' == showinfo ) ? '&showinfo=1' : '&showinfo=0'; option += ( 'yes' == modest ) ? '&modestbranding=1' : '&modestbranding=0'; if ( url != 'error' ) { modal_video.attr('src', "https://www.youtube.com/embed/" + url + option ); modal_container.css('display', 'flex'); } }); // close video modal_close.on('click', function() { modal_container.hide(); modal_video.removeAttr('src'); }); // window click $(window).click( function(e) { if ( e.target.className == 'modal-container' ) { modal_container.hide(); modal_video.removeAttr('src'); } }); }); function get_url( url ) { var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; var match = url.match(regExp); if (match && match[2].length == 11) { return match[2]; } else { return 'error'; } } }); }); })(jQuery);