This is a message.

tabs.js hack: toggle, toggle-each, slideUpSpeed, slideDownSpeed Created Jan 1, 2011

This thread is solved

Views: 2925     Replies: 4     Last reply Jan 12, 2012  
You must login first before you can use this feature

Henrik Bechmann
bechmann.ca

Posts: 20

Registered:
Sep 3, 2010

tabs.js hack: toggle, toggle-each, slideUpSpeed, slideDownSpeed

Posted: Jan 1, 2011

I've hacked the tabs.js file (I install it as tabsfix.js) to add "toggle" and "toggle-each" effects intended for accordions (as well as parameters for slideUpSpeed and slideDownSpeed).

I call it a hack because it doesn't deal with a more basic design issue namely that the following parameters should be separated:
- orientation: "vertical", "horizontal"
- effect: as listed, not including "horizontal"
- mode: "default" (ie. standard), "toggle","toggle-each"

So this is just a kind of prototype.

Anyone interested can try it out with http://pastie.org/1421642 .

Tero, I hope you will find this helpful as you contemplate the next version of tabs.

Best,

- Henrik

PS, I also think the api should include
- expand (open all tabs), and
- collapse (close all tabs)

JimTele

Posts: 2

Registered:
Dec 6, 2010

» tabs.js hack: toggle, toggle-each, slideUpSpeed, slideDownSpeed

Posted: Jan 5, 2011

Reply to: tabs.js hack: toggle, toggle-each, slideUpSpeed, slideDownSpeed, from HBechmann
very cool - thanks!

vuonline

Posts: 1

Registered:
Jan 7, 2011

Great stuff Henrik

Posted: Jan 13, 2011

Reply to: tabs.js hack: toggle, toggle-each, slideUpSpeed, slideDownSpeed, from HBechmann
Used your hack on a site. I'll post the link when it goes live. Just to say what a good job this is.

momper

Posts: 6

Registered:
Apr 10, 2009

works - thank you very much

Posted: Jun 10, 2011

Reply to: Great stuff Henrik, from vuonline
would be nice to have (or: a little bit a must :) in the future versions of tabs ...