Jump to content

Side Menu - Setinterval


Aviway

Recommended Posts

Hay,I try to make my side menu (that i build below) open every time i "onmouseover" it. and i did it with success.But now i want to make the mune open slowly with the "setInterval" method.How can i do it???This is the code:

<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"><html> <head>  <title> Side Menu </title>  <style>*{	padding:0;	margin:0;	}a{	text-decoration:none;	color:#000;	}#menu{	width:150px;	height:150px;	background-color: #ff99ff;	position:absolute;	top:50px;	left:-130px;	}#link{	text-align:center;	float:right;	font: bold 10pt arial; 	padding-top:50px;	padding-right:4px;	line-height:1;	}  </style>  <script language="JavaScript">  <!--	function openMenu()	{		var inx=1;		document.getElementById('menu').style.left=inx;		inx+=1;		if (inx>=0)inx=1;	}	function closeMenu()	{		document.getElementById('menu').style.left="-130px";	}  //-->  </script> </head> <body>	<a href="#" onmouseover="openMenu()" onmouseout="closeMenu()"><div id="menu">		<div id="link">			M<br>			E<br>			N<br>			U		</div>			</div></a>   </body></html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...