2015-05-20 97 views
0

我使用基金会显示模式。我需要一个抽屉完全关闭前,模式本身关闭,成为display:none;在关闭显示模式之前触发事件?

它同时作为结果的显示模式为display:none;抽屉前关闭的抽屉和显示模式当前的代码完全关闭:

$(document).on('close.fndtn.reveal', '[data-reveal]', function() { 
    timber.quickShopDrawer.close(); 
    }); 

我意识到我告诉它关上抽屉基础上密切显示模式我只是无法弄清楚如何做到这一点反过来。任何帮助,将不胜感激。

还是有办法让显示模式为display:block;其被关闭的时候?

回答

0

使用jQuery的setTimeout方法。我们可以解决这个问题。

$('selector').click(function() {//close button click function 
    timber.quickShopDrawer.close();//close the drawer 
    setTimeout(function(){ 
     $('selector').foundation('reveal', 'close');//modal close 
    },800); 
}); 
相关问题