点击页面叠加我希望弹出窗口关闭

时间:2017-10-04 10:02:59

标签: javascript jquery html

当我第一次点击页面叠加时弹出窗口关闭。当我再次刷新页面时,弹出窗口不会在点击页面叠加时关闭。

您可以在演示网站上查看:http://gomodemo.se/hk-sandbox/

I tried following jQuery
jQuery("#pum-3968").click(function($){
     jQuery("#popmake-3968").hide();
     jQuery("#footera").show();
    });

jQuery("#footera").click(function($){
     jQuery("#popmake-3968").show();
     jQuery("#footera").hide();
    });

1 个答案:

答案 0 :(得分:0)

您可以尝试此代码

<script>
    $(window).click(function(e) {
       e = e || event;
       var target = $(e.target) || (e.srcElement);
       //myid is the id of overlay
       if(target.is('#myid')){
        target.hide();
       }
  });
</script>

如果你给我你的HTML代码,我会更有帮助。