Tab Switcher

This piece of JavaScript allows to switch (i.e. show one, hide the others) between grouped HTML elements. That kind of behaviour is widely used in graphical applications and was adopted for use in websites.

TabSwitcher-with-js.png

As shown by a Web browser with JavaScript enabled: Only one content block is shown at a time, and a tab bar allows to switch to the others.

TabSwitcher-without-js.png

As shown by a Web browser with JavaScript disabled: All content blocks are shown at once, one below the other. No tab bar is displayed.