WordPress.org

Forums

Advanced Sidebar Menu
[resolved] accordian style help (10 posts)

  1. rmcfadden
    Member
    Posted 1 year ago #

    I see that you helped a user 1 year ago create an accordian style menu: http://wordpress.org/support/topic/plugin-advanced-sidebar-menu-accordion-menu?replies=28

    I am trying to accomplish something similar on my site--- http://justaskpublications.driostudio.com/consulting_services/

    I tried following your tutorial, but nothing has happened. My goal is to have an arrow next to the child item, so that a user can click on this to dropdown these submenu items. When the user is on one of those child pages this menu should remain open (in its dropdown state).

    Thanks,
    Rachel

    http://wordpress.org/plugins/advanced-sidebar-menu/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Rachel,

    I'm pretty swamped right now with WordSesh happening today, however if you would like priority support feel free to hop over to the site and purchase the pro version.

    http://matlipe.com/product/advanced-sidebar-menu-pro/

    Otherwise I am happy to take a look at this when I get some time.

    Have a great weekend!

  3. rmcfadden
    Member
    Posted 1 year ago #

    Mat, thanks I got it figured out. I don't think I need the pro version, but if you have a few extra minutes I do need help with one item:

    The parent menu that becomes the new dropdown is not clickable itslef. Could you offer help in modifying the js file to make this clickable. For example, on this page: http://justaskpublications.driostudio.com/consulting_services/ The Workshops page is not clickable...only the link below it.

    Thanks again!

    Rachel

  4. Mat Lipe
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Rachel,

    Please post the js you are currently using and I should be able to help you modify it.

    Thanks

  5. rmcfadden
    Member
    Posted 1 year ago #

    Great!

    I am currently using:

    jQuery(document).ready( function($) {
    	//Adds a class to keep track if we are on a parent of child page
    	$('.current_page_item').next().addClass('sidebar-menu-hover');
    
    	//Make the menu open and close by hovering when on a parent page
        $(".child-sidebar-menu.sidebar-menu-hover > li > a").hover(function(){
        	//Slides open and closed the grandchild menu
             $(this).parent().find('ul').slideToggle(400);
             			return false;
         }, function(){
        	 return false;
         });
    
        //Make the menu open and close by clicking if on a child or grandchild page
        $(".child-sidebar-menu > li > a").not(".child-sidebar-menu.sidebar-menu-hover > li > a").click(function(){
        	//If there all no children link the link return Otherwise stop the link
        	if( $(this).parent().find('ul').slideToggle(400).length > 0 ){
        		return false;
        	} else {
        		return true;
        	}
         });
    
        //Initially hides the grandchild menu
        $('.child-sidebar-menu ul').hide();
    
        //Initially show the grandchild menu if on a grandchild or child pages
        $('.child-sidebar-menu ul li.current_page_item').parent().show();
        $('.child-sidebar-menu ul li.current_page_item ul').show();
        $('.child-sidebar-menu li.current_page_item ul').show();
    });
  6. Mat Lipe
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Rachel,

    Here is the adjusted js which will make the menu open on hover and allow the click to follow the link instead of open the menu.

    jQuery(document).ready( function($) {
        //Make the menu open and close by hovering when on a parent page
        $(".child-sidebar-menu > li > a").hover(function(){
            //Slides open and closed the grandchild menu
             $(this).parent().find('ul').slideToggle(400);
             return false;
         }, function(){
             return false;
         });
    
        //Initially hides the grandchild menu
        $('.child-sidebar-menu ul').hide();
    
        //Initially show the grandchild menu if on a grandchild or child pages
        $('.child-sidebar-menu ul li.current_page_item').parent().show();
        $('.child-sidebar-menu ul li.current_page_item ul').show();
        $('.child-sidebar-menu li.current_page_item ul').show();
    
    });

    Hope this helps!

  7. rmcfadden
    Member
    Posted 1 year ago #

    Thank you, that seems to have done it!!

  8. rmcfadden
    Member
    Posted 1 year ago #

    ok I seem to be having an issue when the drop down item is in between other items it is not pushing those items down and it is also pulling one other page link next to it. You can see it here: http://justaskpublications.driostudio.com/consulting_services/

    and here:

    http://justaskpublications.driostudio.com/customer-service/my-account/

  9. Mat Lipe
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Rachel,

    Looks like you have a height set to the list items which it not allowing the sub items to take up space.

    Line 927 of this file is causing the issue.
    http://justaskpublications.driostudio.com/wp-content/thesis/skins/classic-r/css.css

    Removing the height:16px; or setting it to auto or something should take care of it.

    HTH!

  10. rmcfadden
    Member
    Posted 1 year ago #

    So I just noticed one more issue. The client has added additional tiers for the menu items. Now those are behaving funny with the drop down. You can see that here: http://www.justaskpublications.driostudio.com/just-ask-resource-center/e-newsletters/mccca/

    With the e-newsletters sometimes the submenus here open and sometimes they don't, can't quite figure out what is triggering this.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Sidebar Menu
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.