How do I open one Fancybox after another closes?

后端 未结 3 1112
梦毁少年i
梦毁少年i 2020-12-10 00:00

I have 2 fancyboxes and am trying to open the second from the first (either by button or by closing the first)..

3条回答
  •  离开以前
    2020-12-10 00:32

    Here is what I found as a workaround,

    fancyBox version: 2

    $("#first_fancybox_link").fancybox({        
        afterClose:function(){  
            $("#second_fancybox_link").fancybox({ 
                helpers:  {
                    overlay : null
                },
                afterShow:function(){   
                    $.fancybox.helpers.overlay.open({parent: $('body')});
                }
            }).trigger('click');
        }
    }).trigger('click');
    

提交回复
热议问题