How do I test for when the user changes to a different tab in a tab container?
fd.container('Tab1').$on('change', function_to_do);
doesn't work
How do I test for when the user changes to a different tab in a tab container?
fd.container('Tab1').$on('change', function_to_do);
doesn't work
Hello @donald.kantik,
The tab container does not have an event to detect a tab change. As a workaround, you can add an event listener for each tab using jQuery:
var tabContainer = $(fd.container('Container1').$el).find('.nav-link')
for (let i = 0; i < tabContainer.length; i++) {
var tab = tabContainer[i];
tab.addEventListener('click', function() {
//do something
}, false);
}