开发者

Reload parent page on fancybox transitionOut

开发者 https://www.devze.com 2023-01-09 23:45 出处:网络
I am using fancybox to show Iframe within it like this.. $(document).ready(function() { $(\"#button\").click(function() {

I am using fancybox to show Iframe within it like this..

$(document).ready(function() {                          

                $("#button").click(function() {
 开发者_如何学Go               $("#iframe").fancybox({
                'titlePosition'     : 'inside',
                'transitionIn'      : 'fadeIn',
                'transitionOut'     : 'reload()'
                }).click();
            });
});   

Iframe within this fancybox has some action & my parent page shows its status.

So What I want is, as soon as I close ['transitionOut'] fancybox, my parent page gets reload..

How can I achieve this ?

Thanks


Found answer :

                 $("#button").click(function() {
                 $("#iframe").fancybox({
                'titlePosition'     : 'inside',
                'transitionIn'      : 'fadeIn',
                'onClosed'          : function() {
                                      parent.location.reload(true); ;
                                      }
                }).click();
            });
0

精彩评论

暂无评论...
验证码 换一张
取 消