Fancybox onClose无效

时间:2013-07-16 21:12:35

标签: javascript fancybox

我正在尝试重定向到.fancybox的“onclose”属性上的网址...它确实有效。有任何想法吗?代码如下。注意:模态看起来很好,但是当用户按下顶部的“x”时......屏幕只是空白。

<script type="text/javascript">
 showModal();


          function showModal() {


            var url = document.URL;
            var popUp = '//local.meau.com/Support-Center/Service-Notifications/Search-Tips.aspx';
            var site = popUp;


            $(document).ready(function () {
                $.fancybox({
                    'width': 500,
                    'height': '55%',
                    'autoScale': false,
                    'transitionIn': 'none',
                    'transitionOut': 'none',
                    'type': 'iframe',
                    'href': site,
                    'showCloseButton': true,
                    'onClose' : function(){location.href = "http://local.meau.com/Support-Center.aspx";}

                });

            });



        }


    </script>  

1 个答案:

答案 0 :(得分:5)

将您的代码更新为

window.location = "http://local.meau.com/Support-Center.aspx"

仔细检查你的onClose回调

相关问题