O'Reilly logo

jQuery UI Cookbook by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accordions to tabs, and back again

Both the accordion and the tabs widgets are containers. That is, their typical use inside the context of an application is to organize subcomponents. These subcomponents might be other widgets, or any other HTML element for that matter. So, both widgets fit the generic description of a container, that is, a widget with different sections. There are obviously subtleties to that description; for example, accordions don't support remote Ajax content. Also, the way users traverse the sections are quite different. Yet, they're essentially interchangeable. Why not introduce the ability to switch between the two widgets, especially during run time where the users can set their own preference and toggle between the two ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required