我使用fancybox弹出登录页面
jQuery(function () {
jQuery(".spop").fancybox({
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'speedIn': 400,
'speedOut': 200,
'width': 320,
'height': 315,
'padding': 0,
'margin': 0,
'titleShow': false,
'scrolling': 'no',
'type': 'iframe',
'overlayShow': true,
'onClosed': function () {
parent.location.reload(true);
}
});
如你所见,我使用事件'onClosed':function(){parent.location.reload(true);
但我需要做这个事件,但在某些情况下
如果用户点击关闭我需要fancebox不重新加载你可以在这个链接中找到这个问题 http://www.aqar4me.com/rent.aspx
答案 0 :(得分:0)
您可以使用此功能代替当前的
function reloadParentPage() {
var selfUrl = unescape(parent.window.location.pathname);
parent.location.reload(true);
parent.window.location.replace(selfUrl);
parent.window.location.href = selfUrl;
}
它会帮助你。
答案 1 :(得分:0)
您使用以下代码
parent.$.fancybox.close();
而不是使用parent.location.reload(true);