WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: ILC Folding] Default Navigation Mod (2 posts)

  1. DJScorpion
    Member
    Posted 4 years ago #

    Hi there,
    would it be possible to add this code to your plugin?

    //Variable
    var s = false;
    //Prüfen ob Untermenue sichtbar
    jQuery("#nav .menu ul li ul" ).each(function(index, obj){
        if(jQuery(obj).is(':visible')){
            s = true;
        }
    });
    
    //Falls kein Untermenu sichtbar
    if(s==false){
        jQuery("#nav .menu ul li.current_page_parent").parent().show();
    }

    I added it behind the following line:
    jQuery("#nav .menu > ul > li.page_item").click(function()

    The click or hover option could be an option inside of the settings.

    Best Regards,
    Norman Schlorke

    PS: See the working example: http://www.vdvc.de

    http://wordpress.org/extend/plugins/ilc-folding/

  2. Elio Rivero
    Member
    Posted 4 years ago #

    Very interesting, I can see you have removed the href attribute of the ancestor elements. However, you should keep the text enclosed by and and move the text away of the browser area with text-indent: -99999px; so you can still have text on those links that is seen by search engines. I guess
    jQuery("#nav .menu > ul > li.page_item > a").css('text-indent', '-99999px');
    would be enough or you can set it on your stylesheet.
    I will try to add this later but it would involve creating an options page so the user can select the desired behaviour for the navigation links.
    Best,

    Elio

Topic Closed

This topic has been closed to new replies.

About this Topic