问题
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