Drop-down Menu v2 (Ange :D) Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    Drop-down Menu v2 (Ange :D)

    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Drop-down Menu v2 (Ange :D)

    Post by Anzo September 14th 2014, 8:13 am

    Hello.

    About few days ago I requested a Drop-down Menu, that is where Ange Tuteur provided me with JS and CSS:

    Code:
    $(function() {
      $('#pun-navlinks ul').append('<li style="float:right;"><a class="mainmenu drop-nav" href="/" onclick="return false;">Navigation</a><div id="dropdown_nav" style="position:absolute;display:none;"></div></li>');
      $('li:has(a[href="/login"]), li:has(a[href^="/login?logout"]), li:has(a[href="/memberlist"]), #pun-navlinks li:has(a[href="/faq"]), li:has(a[href="/groups"]), li:has(a[href^="/profile"])').appendTo('#dropdown_nav');
      $('li:has(a[href^="/privmsg"])').remove();
      $('#dropdown_nav li').css('display','block');
      $('.drop-nav').click(function() {
        if ($('#dropdown_nav').css('display') == 'none') $('#dropdown_nav').css({'display':'','left':$(this).offset().left+'px','top':$(this).offset().top+40+'px'});
        else $('#dropdown_nav').css('display','none');
      });
    });

    The problem I'm having is that when someone clicks on their profiles, they can only see half the profile options such as Avatar and Preferences while the Signaure button isn't there. Also, after some skin editing, the drop-down menu doesn't seem to fit in there, so I'd like to request a slight change to the code above: I'd like it to only hide the messages, there is no need for drop down menu.

    We're not using PMs in our forums: they're disabled. So having it there makes no sense.

    Thanks Smile
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Drop-down Menu v2 (Ange :D)

    Post by Ange Tuteur September 14th 2014, 2:17 pm

    Hello Anzo,

    Replace your script by :
    Code:
    $(function() {
      $('#pun-navlinks ul').append('<li style="float:right;"><a class="mainmenu drop-nav" href="/" onclick="return false;">Navigation</a><div id="dropdown_nav" style="position:absolute;display:none;z-index:3;"></div></li>');
      $('#pun-navlinks li:has(a[href="/login"]), #pun-navlinks li:has(a[href^="/login?logout"]), #pun-navlinks li:has(a[href="/memberlist"]), #pun-navlinks li:has(a[href="/groups"]), #pun-navlinks li:has(a[href^="/profile"])').appendTo('#dropdown_nav');
      $('#dropdown_nav li').css('display','block');
      $('.drop-nav').click(function() {
        if ($('#dropdown_nav').css('display') == 'none') $('#dropdown_nav').css({'display':'','left':$(this).offset().left+'px','top':$(this).offset().top+40+'px'});
        else $('#dropdown_nav').css('display','none');
      });
    });

    #pun-navlinks must be the parent.

    Anzo wrote:Also, after some skin editing, the drop-down menu doesn't seem to fit in there, so I'd like to request a slight change to the code above: I'd like it to only hide the messages, there is no need for drop down menu.

    This doesn't make sense. Did you ask me to make modifications to a script you wont be using ? If you want to hide the private messages  you'll only need CSS :
    Code:
    #pun-navlinks a[href^="/privmsg"] { display:none }
    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Re: Drop-down Menu v2 (Ange :D)

    Post by Anzo September 14th 2014, 2:43 pm

    Do I add the "#pun-navlinks a[href^="/privmsg"] { display:none }" to JS?

    EDIT: Also we'll be using the Drop-down menu, just not now as we're editing the skin Smile


    Last edited by Anzo on September 14th 2014, 2:47 pm; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Drop-down Menu v2 (Ange :D)

    Post by Ange Tuteur September 14th 2014, 2:43 pm

    No, you add it to the CSS stylesheet :
    Display > Colors > CSS stylesheet
    Anzo
    Anzo
    Forumember


    Posts : 358
    Reputation : 8
    Language : English/Arabic
    Location : Baghdad - Iraq

    In progress Re: Drop-down Menu v2 (Ange :D)

    Post by Anzo September 14th 2014, 2:49 pm

    Okay, thanks.

    Also I edited my post the same time you posted. But, yea. We'll be using the Drop-down menu; however, that is after we finish working on the skin so it all looks good and pretty Smile
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Drop-down Menu v2 (Ange :D)

    Post by Ange Tuteur September 14th 2014, 2:58 pm

    Okay, I was about to say. tongue

    Is this solved now ?