Foundation 5: tabs callback

旧巷老猫 提交于 2019-12-01 10:05:17

问题


Upgrading to Foundation 5. How do I add a callback to my tabs?

Looking at the code it doesn't seem to be possible. It used to be cossible with Sections in Foundation 4.


回答1:


They say there are two ways for callbacks http://foundation.zurb.com/docs/components/tabs.html#callbacks

  $(document).foundation({
    tab: {
      callback : function (tab) {
        console.log(tab);
      }
    }
  });

and

$('#myTabs').on('toggled', function (event, tab) {
    console.log(tab);
  });


来源:https://stackoverflow.com/questions/20144978/foundation-5-tabs-callback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!