Great answer to Richard, what I need! I got the idea that your solution calls 2 animations (fades and fades) which on my js-heavy page looked a little less smooth. I changed the solution a bit to use z-index and 1 fade. This makes things a little smoother for me, at least.
$("#tabs").tabs({ show: function(event, ui) { var lastOpenedPanel = $(this).data("lastOpenedPanel"); if (!$(this).data("topPositionTab")) { $(this).data("topPositionTab", $(ui.panel).position().top) } // do crossfade of tabs $(ui.panel).hide().css('z-index', 2).fadeIn(1000, function() { $(this).css('z-index', ''); if (lastOpenedPanel) { lastOpenedPanel .toggleClass("ui-tabs-hide") .hide(); } }); $(this).data("lastOpenedPanel", $(ui.panel)); } }).tabs('rotate', 3000);
I added a twist at the end, as it makes a pretty nice slideshow!
Tom
source share