Permalink
Browse files

configurable slide up/down speed for slide effect

default speeds to be the same for smoother effect
  • Loading branch information...
bradrobertson committed Sep 5, 2011
1 parent d6a877a commit adc6cac8e08b7588e45e186b35e56ea27e6409b9
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/tabs/tabs.js
View
@@ -26,6 +26,10 @@
event: 'click',
rotate: false,
+ // slide effect
+ slideUpSpeed: 400,
+ slideDownSpeed: 400,
+
// 1.2
history: false
},
@@ -51,7 +55,7 @@
*/
fade: function(i, done) {
- var conf = this.getConf(),
+ var conf = this.getConf(),
speed = conf.fadeOutSpeed,
panes = this.getPanes();
@@ -66,8 +70,10 @@
// for basic accordions
slide: function(i, done) {
- this.getPanes().slideUp(200);
- this.getPanes().eq(i).slideDown(400, done);
+ var conf = this.getConf();
+
+ this.getPanes().slideUp(conf.slideUpSpeed);
+ this.getPanes().eq(i).slideDown(conf.slideDownSpeed, done);
},
/**

0 comments on commit adc6cac

Please sign in to comment.