Created
November 19, 2012 16:19
-
-
Save dtex/4111574 to your computer and use it in GitHub Desktop.
slipNSlide effect for jQuery Tools tabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This custom tabs effect will close one accordion and then open the other | |
as opposed to trying to do both at the same time like "slide" | |
*/ | |
$.tools.tabs.addEffect("slipNSlide", function(i, done) { | |
var conf = this.getConf(); | |
if(this.getCurrentTab().length !== 0) { | |
this.getPanes().slideUp(conf.slideUpSpeed); | |
window.setTimeout( function(that, conf){ | |
that.getPanes().eq(i).slideDown(conf.slideDownSpeed, done); | |
}, conf.slideUpSpeed, this, conf); | |
} else { | |
this.getPanes().eq(i).slideDown(conf.slideDownSpeed, done); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment