简体   繁体   中英

Click event doesn't trigger in my case

My demo http://plnkr.co/edit/7FQ4ftbhcy2RCpz9hDIv?p=preview

I try to remove play button when the video is played but the click trigger didn't get trigger.

<div class="fbVidWrap">

    <img class="plyBtn" src="http://devassets.57square.com/img/video_ply_btn.png" />
    <iframe style="width:100%;border:none" src="https://www.facebook.com/video/embed?video_id=1602992159933648"></iframe>
</div>
$(function(){
  $('.fbVidWrap').click(function(){
    $('.plyBtn').hide();
  });
});

请删除此行:“”看起来不错

Add this css

iframe
{
  pointer-events:none;
}

or add Id to your iframe (ex. myIframe) and then add css like this

#myIframe
{
 pointer-events:none;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM