tmhub / easytabs

Magento Product and Cms pages tabs extension
http://templates-master.com/magento-easy-tabs.html
14 stars 8 forks source link

Add public events: easytabs:beforeActivate, easytabs:afterActivate #4

Closed vovayatsyuk closed 10 years ago

vovayatsyuk commented 10 years ago

Also the ability to determine what tab is shown and was this the first time on this tab

document.observe('easytabs:afterActivate', function(tab, isFirstTime) {
    // this - easytabs object
    // tab - string
    // isFirstTime? - boolean
});
vovayatsyuk commented 10 years ago

53176b225de17dc83540d83eb8b92eaafc8692b0

document.observe('easytabs:afterActivate', function(e) {
    if (e.memo.easytabs.getActivationCount(e.memo.tab) == 1) {
        console.log('first_time');
    }
});