I have playing around with a steriotab system with the prototype.js library, everything works fine except the next DIV under the container of steriotabs is showing like a flash when turning to next tab.. I know its little bit difficult to understand.. here you can see it on their website http://stereointeractive.com/blog/code/prototype-tabs/
你们可以看到,通过改变四个表格(名称、设置、配置、下载)连续三次。 评注部分将显示像一个短于导航表的闪光(名称、设置、配置、下载)。
I think the issue was when it goes to next tab the current one is display:none and ofcourse there is nothing in the meantime(1 or 2 seconds) so the next block of html code is coming to the top just below the navigation..
这种做法可能会造成这一问题。
activate: function(tab) {
var tabName = tab.id.replace(this.options.ids.tab, );
this.currentPanel = this.options.ids.panel+tabName;
if (this.showPanel == this.currentPanel) {
return false;
}
if (this.showPanel) {
if (this.options.effects) {
new Effect.Fade(this.showPanel, {queue: front });
} else {
$(this.currentPanel).hide();
}
}
if (this.options.effects) {
new Effect.Appear(this.currentPanel, {queue: end });
} else {
$(this.showPanel).show();
}
this.tabs.invoke( removeClassName , this.options.classNames.tabActive);
tab.addClassName(this.options.classNames.tabActive);
this.showPanel = this.currentPanel;
}
你们有什么想法?