Slider Revolution WP
09.27.2016
If you have multiple grids on the same page, the code should only be added to one of your page’s grids, and then it will work for all grids on the page automatically.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
jQuery('.esg-grid').each(function() { var $this = jQuery(this), gridLoaded = setInterval(function() { if($this.is(':visible')) { clearInterval(gridLoaded); $this.find('.esg-youtube-frame').each(function() { var video = jQuery(this), src = video.attr('src'), obj = { mozallowfullscreen: 'mozallowfullscreen', webkitallowfullscreen: 'webkitallowfullscreen', allowfullscreen: 'allowfullscreen' } if(src === 'about:blank') { obj['data-src'] = video.attr('data-src') + '&fs=1' } else { obj.src = src + '&fs=1'; } video.attr(obj); }); } }, 500); }); |