Closed kylechandler closed 10 years ago
Cool, thanks!
Is the extra check inside the tabsactivate event's handler necessary?
$(element).on('tabsactivate.ko', function (ev, ui) {
//Prevent this from bubbling up to any parent tab widgets
ev.stopPropagation();
if ($(element)[0] === ev.target) {
//Only activate if this is the right tab widget. Is there a better way to check this?
value.active(ui.newTab.index());
}
});
Isn't ev.stopPropagation() enough?
$(element).on('tabsactivate.ko', function (ev, ui) {
//Prevent this from bubbling up to any parent tab widgets
ev.stopPropagation();
value.active(ui.newTab.index());
});
Merged. Thanks!
Fiddle that demonstrates the problem: http://jsfiddle.net/kylechandler/9dQ48/ Fiddle that points to the new version of tabs.js: http://jsfiddle.net/kylechandler/EcTsX/