Quantcast
Channel: birghtyoursite » jquery
Viewing all articles
Browse latest Browse all 5

awesome jquery slide menu

$
0
0

Add some lines of javascript codes to your page, you will see it’s magic: It make your normal menu looks more elegant. Have a try , you will see the fascination of animate menu .let’s go…

Online demo

Nothing better than a demo:awesome jquery slide menu

Add to your site

First,download the source file and upload to js ,css , images to your site root folder , and then add following codes between <head> and </head>

   <script type="text/javascript" src="jquery-latest.pack.js"></script>
    <script type="text/javascript" src="slide.js"></script>  
    <link href="style.css" rel="stylesheet" type="text/css" />

HTML codes

 <div id="menu" class="menu">
	 <ul>
	 <li><a href="javascript:;">Home</a></li>
	 <li><a href="javascript:;">HTML/CSS</a></li>
	 <li><a href="javascript:;">JavaScript</a></li>
        <li><a href="javascript:;">Resources</a></li>
	<li><a href="javascript:;">Tutorials</a></li>
	<li><a href="javascript:;">About</a></li>
	 </ul>
 </div>

You can see it’s no difference with your normal menu.So the only thing you need to do is adjust your css file, add extra style to the slide menu .

/** style need add for slide menu **/	
 
		.menu ul li a span { 
			position: absolute;
			left: 0;
			width: 110px;
		}
 
		.menu ul li a span.out {
			top: 0px;
		}
 
		.menu ul li a span.over,
		.menu ul li a span.bg {  
			top: -45px;
		}
 
		/** image background **/
 
		#menu {
			background:url(bg_menu.gif) scroll 0 -1px repeat-x;
			border:1px solid #CCC;
		}
 
		#menu ul li a {
			color: #000;
		}
 
		#menu ul li a span.over {
			color: #FFF;
		}
 
		#menu ul li span.bg { 
			height: 45px;
			background: url(bg_over.gif) center center no-repeat;
		}
 
		/** color background **/
 
		#menu2 {
			background:#45A8DF;
		}
 
		#menu2 ul li a {
			color:#FFF;
		}
 
		#menu2 ul li a span.over {
			background: #A6DD00;
			color:#333;
		}
		#menu2 ul li.nav1 a span.over {
			background: #fea274;
		}
		#menu2 ul li.nav2 a span.over {
			background: #b0bbba;
		}
		#menu2 ul li.nav3 a span.over {
			background: #a3f091;
		}
		#menu2 ul li.nav4 a span.over {
			background: #86dbf9;
		}
		#menu2 ul li.nav5 a span.over {
			background: #e0caf0;
		}
		#menu2 ul li.nav6 a span.over {
			background: #9dace9;
		}

You can Reference the style.css in the download files to adjust your own css.so if you understand css well, it’s easy to create one of yours.Good luck!!

Download

awesome jquery slide menu & source codes
Enjoy it !!!

Reference :http://www.cnblogs.com/wiky/archive/2010/04/15/animated-menu-0415.html


Viewing all articles
Browse latest Browse all 5

Trending Articles