Fancy Box - how to refresh parent page when close iframe popup?

前端 未结 12 879
逝去的感伤
逝去的感伤 2020-12-28 19:16

I want my parent page to refresh when I close a Fancy Box popup frame. I have a login page inside the popup, so I need the parent page to refresh to show the new login state

12条回答
  •  执念已碎
    2020-12-28 20:13

    $(".fancybox").fancybox({
                'width'             : '75%',
                'height'            : '65%',
                'autoScale'         : false,
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'type'              : 'iframe',
                'hideOnOverlayClick': false,
                'onClosed'          : function() {
                                      parent.location.reload(true);
                                      }
            });
    

提交回复
热议问题