• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax XMLHttpRequestAsynchronous HTTP Request How To's
  • FreebiesBest Freebies Collection
  • MiscellaneousNews, Announcements & General Stuffs
  • Print & Web DesignPhotoshop, Vector, CSS, XHTML
  • ProgrammingProgramming PHP, ASP, .NET and more

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 Bookmarks
  • 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.

20 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/



  15. Visit My Website

    March 4, 2010

    Permalink

    Arun Sharma said:

    oey!! vertical ko bare kina nalekhe ko!!!plz culd you write on the vertical slideing bar using jquery??



  16. Visit My Website

    March 12, 2010

    Permalink

    Indialike said:

    Very nice and useful tutorials for web designers,
    Thanks for posting.



  17. Visit My Website

    March 25, 2010

    Permalink

    99 техник создания меню для сайта CSS и jQuery | SHEBEKO.COM said:

    [...] Jquery вертикальное слайд меню | Демо версия [...]



  18. Visit My Website

    April 2, 2010

    Permalink

    Nauman Akhtar said:

    How many items I can add to it ?



  19. Visit My Website

    April 6, 2010

    Permalink

    Val Che said:

    Nice workaround, very usefull for me, thanks for the article man.



  20. Visit My Website

    June 22, 2010

    Permalink

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

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



Leave a Comment

Here's your chance to speak.

  1. Name (required)

    Mail (required)

    Website

    Message

  • Most Popular Posts

    • { 108 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 71 } ResponsesASP Classic Programming Still Alive
    • { 53 } Responses63+ best practice to optimize PHP code performances
    • { 44 } ResponsesVideobox: Lightbox for videos
  • Latest Posts

    • PHP Newbie: Proper handling of Error & Exception in PHP
    • Why SEO lost importance
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets
    • Multiple Google Account Signin
    • Install, Configure & Running Memcache in Windows as Service
    • DynamicWP Image Cube Wordpress Plugin
    • New Wordpress 3.0 API menu_page_url
    • Wordpress 3.0 Custom Taxonomy
    • JQuery DataGrid Plugin Compass
    • Upgrading to upcoming CodeIgniter 2.0
  • Categories

    • advertorial
    • Ajax XMLHttpRequest
    • Featured
    • Freebies
    • Miscellaneous
    • Print & Web Design
    • Programming
    • Tutorials
    • Web 2.0
  • Featured News

    • PHP Newbie: Proper handling of Error & Exception in PHP by webmaster on August 18, 2010
    • Why SEO lost importance by webmaster on August 16, 2010
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets by webmaster on August 16, 2010
    • Install, Configure & Running Memcache in Windows as Service by webmaster on June 27, 2010
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
  • Tag Cloud

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

    • August 2010
    • June 2010
    • May 2010
    • September 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
copyleft 2007 - 2010 Bali Website Design Studio