aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2009-01-31 00:45:14 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2009-01-31 00:45:14 +0000
commit195838c443502b5b52c00b889e9b7b0a4af57d63 (patch)
tree75e1710062236be8b064605647e7f04ede235a73 /ui
parent82cf103c9325e24ef55b45cdb0a169f1c186ccb5 (diff)
downloadjquery-ui-195838c443502b5b52c00b889e9b7b0a4af57d63.tar.gz
jquery-ui-195838c443502b5b52c00b889e9b7b0a4af57d63.zip
Tabs: simplified tests a bit, found bug by that - fixed as well as two other unreported bugs
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.tabs.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js
index ef69ffde3..b0be8e813 100644
--- a/ui/ui.tabs.js
+++ b/ui/ui.tabs.js
@@ -41,7 +41,7 @@ $.widget("ui.tabs", {
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0]));
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
},
-
+
_ui: function(tab, panel) {
return {
tab: tab,
@@ -88,7 +88,7 @@ $.widget("ui.tabs", {
// invalid tab href
else
- o.disabled.push(i + 1);
+ o.disabled.push(i);
});
// initialization from scratch
@@ -255,7 +255,6 @@ $.widget("ui.tabs", {
// attach tab event handler, unbind to avoid duplicates from former tabifying...
this.$tabs.unbind('.tabs').bind(o.event + '.tabs', function() {
-
var $li = $(this).parents('li:eq(0)'),
$hide = self.$panels.filter(':visible'),
$show = $(self._sanitizeSelector(this.hash));
@@ -334,12 +333,13 @@ $.widget("ui.tabs", {
if (o.event != 'click') this.$tabs.bind('click.tabs', function(){return false;});
},
-
+
destroy: function() {
var o = this.options;
- this.element
- .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
+ this.element.unbind('.tabs')
+ .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all')
+ .removeData('tabs');
this.list.unbind('.tabs')
.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all')
@@ -364,6 +364,7 @@ $.widget("ui.tabs", {
'ui-corner-top ' +
'ui-tabs-selected ' +
'ui-state-active ' +
+ 'ui-state-hover ' +
'ui-tabs-deselectable ' +
'ui-state-disabled ' +
'ui-tabs-panel ' +
@@ -479,7 +480,7 @@ $.widget("ui.tabs", {
// no remote or from cache - just finish with callback
// TODO in any case: insert cancel running load here..!
-
+
if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
callback();
return;
@@ -540,7 +541,7 @@ $.widget("ui.tabs", {
url: function(index, url) {
this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
},
-
+
length: function() {
return this.$tabs.length;
}