e24TabMenu – AJAX Dropdown Tab Menu
Introdution
e24TabMenu is a plugin written for scriptaculous. It is a tab menu that expands collapse smoothly.
Demos
Usage
Include Prototype 1.6.0.2 and Scriptaculous 1.8.1 in the HTML code header. Also include e24TabMenu after both:
<script type='text/javascript' src='js/prototype.js'></script>
<script type='text/javascript' src='/js/scriptaculous.js?load=effects'></script>
<script type='text/javascript' src='js/e24tabmenu.js'></script>
Next, write the necesary HTML code to define de menu. We will need a container layer (“menu” on the example) and inside the container we will have a layer for each menu item where we will add its content. After that, add links (html tag “A”) for each menu’s tab, the “rel” attribute value must be e24menuitem[layer_id] where layer_id is the id of the content layer (on the example “ítem_3d”, “ítem_gall”, “ítem_menu”, “ítem_efec”). Bellow the links we can add contents that will show when all tabs are collapsed.
<div id="menu" ><!---menu container-->
<div id="item_3d" class="menutarget">
Contenido
</div>
<div id="item_gall" class="menutarget">
Contenido
</div>
<div id="item_menu" class="menutarget">
Contenido
</div>
<div id="item_efec" class="menutarget">
Contenido
</div>
<!---tabs del menu-->
<a id="3d" href="#3d" rel="e24menuitem[item_3d]"><img src="img/3d.gif" alt="Efectos 3D" /></a>
<a id="gall" href="#galerias" rel="e24menuitem[item_gall]"><img src="img/galerias.gif" alt="Galeria de fotos AJAX" /></a>
<a id="menus" href="#menus" rel="e24menuitem[item_menu]" ><img src="img/menus.gif" alt="Efectos de Menus" /></a>
<a id="efec" href="#efectos" rel="e24menuitem[item_efec]"><img src="img/efectos.gif" alt="Otros efectos ajax" /></a>
<!---tabs del menu-->
<div id="maincontent">
Contenido principal
</div><!--texto-->
</div><!--menu container-->
Finally we write the necesary javascript code to define the menu. As first param we will pass the container layer id , and as second param an option’s array.
oe24TabMenu = new e24TabMenu( 'menu', { duration: 1.0, transition: Effect.Transitions.sinoidal } );
Options
- duration: Decimal, representing the time in seconds that will take the menu item movement. Default value: 1.0
- transition: Function that modifies each animation’s point: Effect.Transitions.sinoidal (default), Effect.Transitions.linear, Effect.Transitions.reverse, Effect.Transitions.wobble, Effect.Transitions.flicker
- callback: callback function that will be processed once the animation is complete. It is useful to concatenate animations.
Methods
- toggleMenu: Toggles the tab. Requieres the object reference of the corresponding link.
oe24TabMenu.toggleMenu($('3d'));
Known Issues
- Add more directions like, down-top, letf-right, right-left.
Download
e24TabMenu 0.8 beta (176 KB)








18 de April, 2008 a las 4:00 pm
[…] principales de lo que se había venido a denominar Web 2.0. Ayer, navegando, me topé con esta página donde nos explican cómo incorporar menús emergentes en nuestras aplicaciones web usando un […]
21 de April, 2008 a las 10:50 pm
Thanks, nice work. The tabs look great.
I had to switch browsers to get the demonstration showing in the iframe.
21 de April, 2008 a las 11:04 pm
Thanks, tell me please which browsers are failing with iframes.
22 de April, 2008 a las 12:25 pm
It’s internet explorer. I checked the lightbox site and it works there, could be a conflict or you need an update.
30 de April, 2008 a las 8:18 am
Nice script. When middle-clicking in firefox, I would expect that the tab opens as selected in a new window/browser tab.
6 de June, 2008 a las 1:10 am
Great tool. I also had trouble viewing the demonstration, though. I was working in Opera (9.50, build 4839). Switched to Safari and had no problems. But I had to switch back to Opera to post this comment. In Safari (3.1.1, build 5525.20) the “Envair Commentario” button is in accessible. It is hidden behind the footer.
16 de June, 2008 a las 7:36 pm
Tab Menú Desplegable AJAX…
Menú de pestañas AJAX un tanto original, que despliega hacia abajo con un efecto deslizante suave. Muy útil para poner pestañas superiores con información adicional en nuestros sitios. Otra de las maravillas que nos trae AJAX24 de la mano de proto…
13 de July, 2008 a las 4:49 am
Actually the problem in opera 9.5, is the height, that is too small.
14 de July, 2008 a las 4:39 am
why the menu is covered by swf file?? please help me
16 de July, 2008 a las 3:39 pm
Ajax: Dropdown Tab Menu…
Un plugin scris pentru scriptaculous. In esenta un tab menu care se extinde si colapseaza usor….
23 de July, 2008 a las 8:27 am
Hi thanks for a great script…Any ideas on a vertical version…..sorry i don’t speak Spanish.
x
Sarah
24 de July, 2008 a las 6:55 am
Hi,
This is awesome tab technique
I tried it myself… it worked…
Thanks
25 de July, 2008 a las 9:46 pm
Departe, Mike, Sha: Thanks for your help, i finally changed the lightbox component and i think that now it works ok on all browsers.
Zhar: i don’t knoe what do you mean,… i don’t have any swf there.
0423961559: A vertical tab menu is in my plans for the new release.
Pradeep: Thanks to you, let me know if you have any problem.
31 de July, 2008 a las 2:03 am
hey…
nice…
31 de July, 2008 a las 3:10 pm
Can this tab menu used from the bootom of the page going up?
2 de August, 2008 a las 8:39 pm
The tab menu appearing from diferent directions will be ready on the next release.