aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2009-01-31 01:16:59 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2009-01-31 01:16:59 +0000
commit0ad6bff312efafb60303861c0f0e7663d69e42d8 (patch)
treecd7efc5a290c7e5deab955e49e4f71fe3ab296b4
parent195838c443502b5b52c00b889e9b7b0a4af57d63 (diff)
downloadjquery-ui-0ad6bff312efafb60303861c0f0e7663d69e42d8.tar.gz
jquery-ui-0ad6bff312efafb60303861c0f0e7663d69e42d8.zip
Tabs: reviewed and simplified just a bit
-rw-r--r--ui/ui.tabs.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js
index b0be8e813..e02e61c30 100644
--- a/ui/ui.tabs.js
+++ b/ui/ui.tabs.js
@@ -325,12 +325,10 @@ $.widget("ui.tabs", {
// which can become a usability and annoying problem with tabs('rotate').
if ($.browser.msie) this.blur();
- return false;
-
});
- // disable click if event is configured to something else
- if (o.event != 'click') this.$tabs.bind('click.tabs', function(){return false;});
+ // disable click in any case
+ this.$tabs.bind('click.tabs', function(){return false;});
},
@@ -473,8 +471,7 @@ $.widget("ui.tabs", {
load: function(index, callback) { // callback is for internal usage only
var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
- bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
- // TODO bypassCache == false should work
+ bypassCache = callback == undefined, url = $a.data('load.tabs');
callback = callback || function() {};
@@ -577,7 +574,7 @@ $.extend($.ui.tabs.prototype, {
rotation: null,
rotate: function(ms, continuing) {
- var self = this, t = this.options.selected;
+ var self = this, o = this.options, t = o.selected;
function rotate() {
clearTimeout(self.rotation);
@@ -590,7 +587,7 @@ $.extend($.ui.tabs.prototype, {
// start rotation
if (ms) {
this.element.bind('tabsshow', rotate); // will not be attached twice
- this.$tabs.bind(this.options.event + '.tabs', !continuing ?
+ this.$tabs.bind(o.event + '.tabs', !continuing ?
function(e) {
if (e.clientX) { // in case of a true click
clearTimeout(self.rotation);
@@ -598,7 +595,7 @@ $.extend($.ui.tabs.prototype, {
}
} :
function(e) {
- t = self.options.selected;
+ t = o.selected;
rotate();
}
);
@@ -608,7 +605,7 @@ $.extend($.ui.tabs.prototype, {
else {
clearTimeout(self.rotation);
this.element.unbind('tabsshow', rotate);
- this.$tabs.unbind(this.options.event + '.tabs', stop);
+ this.$tabs.unbind(o.event + '.tabs', stop);
}
}
});