tam2000k2
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Fixing WordPress
In reply to: Fancybox Vimeo full screen not workingI do not know why the attributes and the “https” is being stripped, but the temporary solution is as follows, but I need a more elegant and permanent solution:
<script type="text/javascript"> (function() { var linkVimeo1 = document.getElementById("vimeolink1"); linkVimeo1.addEventListener("click", function(){ var t1 = setTimeout(function() { var mFancyBoxFrame = document.getElementById("fancybox-frame"); mFancyBoxFrame.setAttribute("webkitallowfullscreen", "true"); mFancyBoxFrame.setAttribute("mozallowfullscreen", "true"); mFancyBoxFrame.setAttribute("allowfullscreen", "true"); var tempLink1 = mFancyBoxFrame.src; var t3 = setTimeout(function() { document.getElementById("fancybox-frame").src = tempLink1; console.log(document.getElementById("fancybox-frame").src); }, 500); }, 500); }); var linkVimeo2 = document.getElementById("vimeolink2"); linkVimeo2.addEventListener("click", function(){ var t2 = setTimeout(function() { var mFancyBoxFrame = document.getElementById("fancybox-frame"); mFancyBoxFrame.setAttribute("webkitallowfullscreen", "true"); mFancyBoxFrame.setAttribute("mozallowfullscreen", "true"); mFancyBoxFrame.setAttribute("allowfullscreen", "true"); var tempLink2 = mFancyBoxFrame.src; var t4 = setTimeout(function() { document.getElementById("fancybox-frame").src = tempLink2; console.log(document.getElementById("fancybox-frame").src); }, 500); }, 500); }); })(); </script>
Viewing 1 replies (of 1 total)