View Full Version : Change Tab Callbacks

18 Jun 2010, 10:11 AM
Starting with the tabpanel example I am trying to change the badge number on click. I have tried editing the item and adding a beforeshow: function(el) { } type callback with the following code, but it does not work in Safari 5 on Mac OS X. Any clues?

title: 'Favorites',
html: '<h1>Favorites Card</h1>',
iconCls: 'favorites',
cls: 'card2',
badgeText: '4',
beforeshow: function(el) {
el.badgeText = '3';

18 Jun 2010, 10:40 AM
You can listen for the activate event on the card. activate: function(card) {card.setBadgeText('0');}