tree menu css with jquery

Posted: 4 сар 11, 2011 in css, Проргамчлал, html, JQuery
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
<script src="http://code.jquery.com/jquery-1.5.2.min.js" type="text/javascript"></script> 
<style> 
*{ margin:0; padding:0;} 
.menu li ul{ display:none; position:absolute; float:left; width:120px;} 
.menu li{ float:left; padding:5px;} 
</style> 
<script type="text/javascript"> 
$().ready(function(){ 
$(".menu li, .menu li a").hover( 
function(){ $(this).children("ul").show(); 
}, 
function(){ $(this).children("ul").hide(); 
} );   
}); </script> 
</head>   
<body>
 <ul class="menu"> 
<li><a href="#">products</a>
 <ul> 
 <li><a href="#">khaantea</a></li>
 <li><a href="#">OGedei coffee</a></li> 
 </ul> 
</li> 
<li><a href="#">About us</a></li> 
</ul> 
</body> </html> 
Advertisements
Сэтгэгдэлүүд
  1. uuganaa хэлдэг:

    нэг л сайн ойлгож өгөхгүй юм comment үлдээхийг

Хариулт үлдээх

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Өөрчлөх )

Twitter picture

You are commenting using your Twitter account. Log Out / Өөрчлөх )

Facebook photo

You are commenting using your Facebook account. Log Out / Өөрчлөх )

Google+ photo

You are commenting using your Google+ account. Log Out / Өөрчлөх )

Connecting to %s