• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax
  • Design
  • Development
  • Freebies
  • IT News
  • Miscellaneous
  • Programming
  • Tutorials
  • Web 2.0

Bali Web Design

Posted on November 13, 2008 - by webmaster

Jquery Vertical Slide (Dropdown) Navigation

Freebies Tutorials Web 2.0

jquery vertical slide navigation

I have sometimes today to play around with jquery horizontal slide navigation (horizontal accordion navigation) (demo), I want to make it slide vertically, and here is what i have made.

Tested in FF3, Opera 9, IE 6, Safari 3. Dependencies: Jquery & Optional Jquery Easing Plugin.

Javascript File

$(function(){
	/**
	*	Jquery Horizontal Slide Navigation
	*	webmaster@chazzuka.com
	*	http://www.chazzuka.com
	*	Nov 13th 2008 @ Denpasar, Bali Paradise Island
	**/
	//@ active scroll
    var _active = null;
	//@ max expand in pixel
    var _hmax = 80;
	//@ min height in pixel
    var _hmin = 0;
	//@ loop through matches selector
    $("ul#nav li a").each(function(){
		//@ in/out handler
		$(this).hover(
			//@ hover
			function(){
				//@ child span expand
				$(this).find('span').animate({height: _hmax+"px"}, {queue:false, duration:300, easing:'easeOutBack'});
				//@ set active to current hovered
				_active = $(this);
			},
			//@ out
			function() {
				//@ slide back
				$(_active).find('span').animate({height: _hmin+"px"}, {queue:false, duration:300,easing:'easeInBack'});
			}
		);
	});
});

CSS File

ul{ margin:0 10px; padding: 0; position:absolute; top:0; z-index:9; }
ul li{ padding: 0px; margin:0 1px 0 0; list-style:none; display:inline; float:left; }
ul li a{ display: inline-block; width: 150px; padding:0 0 5px 0; white-space:nowrap; text-align:center; text-decoration:none; color:#E4E4E4; text-transform:lowercase }
ul li a:hover { color:white; }
ul li a span { display:inline-block; height:0px; overflow:hidden; }
ul li a strong { font-size:14px; text-transform:uppercase; padding-top:5px; display:block;}
ul li a.blue { background: url(images/blue.png) bottom center no-repeat; }
ul li a.red { background: url(images/red.png) bottom center no-repeat; }
ul li a.orange { background: url(images/orange.png) bottom center no-repeat; }
ul li a.green { background: url(images/green.png) bottom center no-repeat; }
ul li a.black { background: url(images/black.png) bottom center no-repeat; }

HTML File

<ul id="nav">
   	<li><a href="#" class="blue"><span></span><strong>Bali Web Design</strong>Bali Web Design Services</a></li>
    <li><a href="#" class="black"><span></span><strong>Web Services</strong>Design Development &amp; SEO</a></li>
    <li><a href="#" class="red"><span></span><strong>Web Developer</strong>Freelance Web Developer</a></li>
    <li><a href="#" class="green"><span></span><strong>Web Portfolio</strong>Web Developer Portfolio</a></li>
    <li><a href="#" class="orange"><span></span><strong>Web 2.0</strong>Web 2.0 Resources Blog</a></li>
</ul>
Share this article:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • LinkedIn
  • MySpace
  • Ping.fm
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
This entry was posted on Thursday, November 13th, 2008 at 09:33 and is filed under Freebies, Tutorials, Web 2.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

14 Comments

We'd love to hear yours!



  1. Visit My Website

    November 14, 2008

    Permalink

    links for 2008-11-14 at bananas on toast said:

    [...] Jquery Vertical Slide (Dropdown) Navigation Interesting style of top-bar navigation (tags: webdesign jquery javascript) « links for 2008-11-13 [...]



  2. Visit My Website

    November 19, 2008

    Permalink

    Jswa said:

    Nice work! That is an awesome use of a JQuery verticle drop down menu.



  3. Visit My Website

    November 20, 2008

    Permalink

    Titanium Jewelry said:

    Hey. Your post has a wonderful visual appeal in it. I want to congratulate the designer who has designed this website. Very well-done .



  4. Visit My Website

    November 22, 2008

    Permalink

    Tungsten Jewelry said:

    I first want to congratulate the graphic designer of this site. You have done an excellent job man. I am really impressed with your sense of designing. Keep it up. All the best.



  5. Visit My Website

    November 24, 2008

    Permalink

    Nandini@HIPs Consultant said:

    Hi. I am really impressed with your style of designing. The post has a wonderful visual appeal. Credit goes to the web designer. Good work man. Keep it up.



  6. Visit My Website

    December 3, 2008

    Permalink

    13 Excellent Tutorials On Creating jQuery Navigation Menu | DeveloperFox said:

    [...] 10- Jquery Vertical Slide (Dropdown) Navigation [...]



  7. Visit My Website

    December 10, 2008

    Permalink

    FT said:

    Thanks for this Jquery vertical slide. I’m going to see whether i can implement it myself. great site by the way!



  8. Visit My Website

    December 12, 2008

    Permalink

    Martin said:

    Very cool! Thanks for the tutorial…
    I want to modify it a bit – in the actual space that is generated by the drop down tab I’d like to include a list of navigation items. Is this possible? ANy idea how to do it?

    Thanks!



  9. Visit My Website

    January 5, 2009

    Permalink

    suzy said:

    hey this is a great piece of code. Is it possible to have it work the opposite way? inotherwords could the menus slide up from the bottom of the page?



  10. Visit My Website

    January 20, 2009

    Permalink

    WebAir Blog » Blog Archive » 17 “Must see” Menu in jQuery said:

    [...] Vertical Dropdown Slide Navigation Menu in jQuery [...]



  11. Visit My Website

    March 17, 2009

    Permalink

    Gabi said:

    Hi,

    Excellent tutorial, really clear and excellent design.

    I am stuck in regards how to implement this to my current scenario.

    I have a website with 12 products, 4 rows of three.

    Each product will have a more info, where if clicked it will display some extra text.

    Can’t get my head around how to carry this out with your example.

    I don’t see a way of doing it and don’t want to create a new instance for each product,

    Please could you point me in the right direction?

    Here is a link to visualise what I am trying to achieve :)

    http://www.jameshallamsme.co.uk/design_5/index.htm



  12. Visit My Website

    August 20, 2009

    Permalink

    geoffb said:

    just wondering if this menu could be used in a wordpress theme???



  13. Visit My Website

    October 12, 2009

    Permalink

    Ultimate collection of top jQuery tutorials, tips-tricks and techniques to improve performance « Technosiastic! said:

    [...] Jquery Vertical Slide (Dropdown) Navigation [...]



  14. Visit My Website

    October 12, 2009

    Permalink

    Shahriar Hyder said:

    Nice one mate. I have also added the link to your post in my Ultimate collection of top jQuery tutorials, tips-tricks and techniques to improve performance. Have a check below:

    http://technosiastic.wordpress.com/2009/09/24/collection-of-top-jquery-tutorials-tips-tricks-techniques-to-improve-performance/



Leave a Comment

Here's your chance to speak.

  1. Name (required)

    Mail (required)

    Website

    Message

  • Ad Ad Ad Ad
  • Recommended Links

  • Featured News

    • PHP Class Create Short URL via TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API by webmaster on September 24, 2009
    • How to embed plurk status in wordpress blog by ruby on September 12, 2009
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
    • Prism Firefox Extension, bring your web apps to the desktop by ruby on May 11, 2009
    • Troubleshoots During Migration by webmaster on March 7, 2009
  • Latest Entry

    • PHP Class Create Short URL via TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API
    • How to embed plurk status in wordpress blog
    • Scripty2 the successor of script.aculo.us
    • Social Network Icon Pack
    • jQuery validation engine, jquery inline form validation
  • Tag Cloud

    • Actionscript advertorial Ajax API best practices chat Classic ASP CMS CSS Design Development facebook firefox Flash flickr Freebies gmail HTML icons Javascript Jobs jQuery jQuery Plugins Library Lightbox Mootools news Personal PHP plurk prism Prototype regex regular expression Scriptaculous SEO Tutorial twitter Web 2.0 Wordpress Works YUI
  • Most Popular Posts

    • { 80 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 57 } ResponsesASP Classic Programming Still Alive
    • { 50 } Responses63+ best practice to optimize PHP code performances
    • { 37 } ResponsesVideobox: Lightbox for videos
© 2007 - 2010 Bali Web Design all rights reserved
Powered by wordpress Theme by woothemes