Fancybox afterClose event not working

前端 未结 3 2077
忘了有多久
忘了有多久 2021-01-14 23:41

I\'m having a problem using the fancybox API after Close.

I open the function when people click on this:



        
3条回答
  •  一向
    一向 (楼主)
    2021-01-15 00:07

    Try using onClose event:

    $('.fancybox.iframe')
    .fancybox({
        arrows : false,
        padding: 0,
        overlay: {
            locked: false
        },
        onClosed: function() {
            location.reload(); 
        }
    
    });
    

    According to the API there is no beforeClose event, but there is onClose

    http://fancybox.net/api

提交回复
热议问题