aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.tabs.js
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2009-01-21 21:05:07 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2009-01-21 21:05:07 +0000
commit4af30fece37b0b3525d08b6920b9a60f093bb77f (patch)
tree41e5130783b522cbac1164fd776dc04285d745a6 /ui/ui.tabs.js
parentfe303b40d0a11a7a18a905866b1c93baf1f59ccb (diff)
downloadjquery-ui-4af30fece37b0b3525d08b6920b9a60f093bb77f.tar.gz
jquery-ui-4af30fece37b0b3525d08b6920b9a60f093bb77f.zip
UI Tabs: fixed broken animations and the frequently reported "jumpyness", fixes #3872
Diffstat (limited to 'ui/ui.tabs.js')
-rw-r--r--ui/ui.tabs.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js
index f2ca04f6e..3d566e5d1 100644
--- a/ui/ui.tabs.js
+++ b/ui/ui.tabs.js
@@ -233,7 +233,7 @@ $.widget("ui.tabs", {
// set up animations
var hideFx, showFx;
if (o.fx) {
- if (o.fx.constructor == Array) {
+ if ($.isArray(o.fx)) {
hideFx = o.fx[0];
showFx = o.fx[1];
}
@@ -250,11 +250,11 @@ $.widget("ui.tabs", {
// Show a tab...
var showTab = showFx ?
function(clicked, $show) {
- $show.animate(showFx, showFx.duration || 'normal', function() {
- $show.removeClass('ui-tabs-hide');
- resetStyle($show, showFx);
- self._trigger('show', null, self.ui(clicked, $show[0]));
- });
+ $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
+ .animate(showFx, 500, function() {
+ resetStyle($show, showFx);
+ self._trigger('show', null, self.ui(clicked, $show[0]));
+ });
} :
function(clicked, $show) {
$show.removeClass('ui-tabs-hide');
@@ -267,7 +267,7 @@ $.widget("ui.tabs", {
$hide.animate(hideFx, hideFx.duration || 'normal', function() {
$hide.addClass('ui-tabs-hide');
resetStyle($hide, hideFx);
- if ($show) showTab(clicked, $show, $hide);
+ if ($show) showTab(clicked, $show);
});
} :
function(clicked, $hide, $show) {