Fade in tabs in Zurb Foundation?

前端 未结 8 729
清歌不尽
清歌不尽 2021-01-03 03:04

I\'m trying to figure out if there\'s setting to fade in tabs nicely in Zurb Foundation.

If not, does anyone know the best way to achieve this manually?

Wha

8条回答
  •  情歌与酒
    2021-01-03 03:43

    If anybody stumble upon this issue with foundation 6 here is my jQuery solution as I'm not a big fan of modifying the core of any framework.

    // hack for fondation tabs animation 
    $(document).on('change.zf.tabs', function(e) {
        var activeTab =  $($(e.target).find('.is-active a').attr('href'));
        activeTab.css('display', 'none').fadeIn();
    });
    

    Note: is-active class should be replaced by the one you specified if any.

提交回复
热议问题