Fancybox Popup not removing overlay in Chrome and IE

别来无恙 提交于 2019-12-11 15:27:55

问题


http://www.teachhub.com/sevcik-tester-ooyala

Fancybox close event is not removing the dark overlay in Chrome and IE. Firefox works great. I'm using fancybox 2. The commented out items below, I've tried forcing the close event and it's not working. The main window closes, but the dark overlay remains.

<script type="text/javascript">
jQuery(document).ready(function() {
jQuery.noConflict();
});
</script>
<div style="width: 312px;">

<script type="text/javascript">

jQuery(document).ready(function(){

   jQuery("a.videolink").fancybox({

  closeClick  : true,
  helpers   : { 
  overlay : {closeClick: true}
 },


      'afterClose': function () {
      videoPlayer.pause();
      //jQuery("#fancybox-wrap").hide();
      //jQuery("#fancybox-wrap").empty();
//jQuery("#fancybox-overlay").hide();
//jQuery("#fancybox-overlay").empty();
     //jQuery('#fancybox-overlay').unbind();
      }
   });
});
</script>
<script src='http://player.ooyala.com/v3/apikey'></script>

<p style="font-weight: bold; color: red; font-size: 18px; line-height: 21px; margin-bottom: 10px; margin-left: 10px;">Welcome to TeachHUB.com</p>

<!-- The Video Thumbnail -->
<a class="videolink" href="#videocontainer" title="">
<img src="/sites/default/files/homepage-video-player.jpg" style="float: left; padding: 0px 15px 15px 10px;"/>
</a>

<!-- The Video Object -->
<div id="videocontainer">
        <div id='playerwrapper' style='width:480px;height:360px;'></div>

<script>
var videoPlayer = OO.Player.create('playerwrapper','R0ZjB2NTqDw3YRWba9RIpRnF6D9lRYKP',   {
   // additional params go here
});

videoPlayer.play();
</script>
</div>

回答1:


After you close fancybox in Chrome, it triggers 1500+ js errors .... it's most likely a loop.

try loading a single instance of jQuery (ideally the latest version) ... so far, I have found 3 different versions (v1.7.2, v1.4.4 and v1.3.1).



来源:https://stackoverflow.com/questions/13020370/fancybox-popup-not-removing-overlay-in-chrome-and-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!