www.webdeveloper.com
Results 1 to 1 of 1

Thread: Trying to improve Vertical Accordion style menu

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    Trying to improve Vertical Accordion style menu

    Hey Everyone,
    i'm looking to create the utilmate accordian style vertical menu. here's what i have so far. it uses jQuery hover function.

    http://www.thetownie.com/menu/vertical-acc-menu.html

    unfortunately what i have here is very jerky and even bounces at times. i tried setting so that only one opens at a time but that doesn't seem to be working.

    or perhaps, a hover function in this context isn't practical at all, not sure!

    maybe instead of hover, a click or some kind of click/toggle function? or if, if there is some better code that already exists, i'd love to know about it.

    anyway, any input would be greatly appreciated, thanks. hopefully others can use this same code. the jQuery is below:

    PHP Code:
    $('ul.left-sub-cat').hide();

    $(
    "li.menuHeader").hover(
        function(){
            $(
    'ul.open').slideUp('fast').addClass('closed');
            $(
    'ul'this).slideDown('slow').addClass('open');
        },
        function(){
            $(
    'ul'this).slideUp('slow').addClass('closed');
            $(
    'ul.left-sub-cat').slideUp().addClass('closed');
        }); 
    Last edited by toptomato; 12-01-2013 at 11:45 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles