Code
Code
Code

TekMenu, Menu html with JQuery

Objective: To create a plugin to generate dynamic menus, really easy to use.

Download :

Tekmenu

Plugin:

The basic call

$ ("a.menu). TekMenu ();

The link with the menu style must have the rel tag with the id of html to be shown by the menu plugin.

 

<a href="" class="menu" rel="#menu1">Entrada menu</a>
<div id="menu" class="second " >
 <ul class="second">
  <li> Item 1</li>
  <li> Item 2</li>
  <li> Item 3</li>
 </ul>
</div>

The CSS:

div.second {
	width:300px; // need to set a wide
	position:absolute; / / position must be absolute
	z-index:1300; / / z-index indicates that it should be over other items
	display:none;.

}

 

Parameters: 

fullAnimation (boolean) if true allows to finish the animation but the mouse is already outside. With false hides directly.

timeout (integer) time to wait before hiding the menu.

 

Let's take a demo.

 

Comment 1 for Wijdan Rohail

Quite simple but interesting
Comments posted 08/12/2010 11:48:57
comments powered by Disqus
Comunicatek - - La Bisbal d’Empordà - dani@comunicatek.com - About code - Legal