Closed croxton closed 5 years ago
Can you put together a reduced test case for me?
Sorry for taking so long to get back to you on this @croxton. So, the event does fire, but in your demo, you've setup the listener after you have instantiated Tabby
, so that first default tab load event fired before an event listener existed to catch it.
Put the event listener first and it will work as expected.
document.addEventListener('tabby', function (event) {
console.log(event);
}, false);
var tabs = new Tabby('[data-tabs]');
This can be a problem if you rely on the
tabby
event to load content into a tab with ajax, for example.This is a workaround but it would be better if this was handled in Tabby: