The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Drop-down Menu v2 (Ange :D)

View previous topic View next topic Go down

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

Post by Anzo on 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

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

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

Post by Ange Tuteur on 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 }

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

Post by Anzo on 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

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

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

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

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

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

Post by Anzo on 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

Anzo
Forumember

Posts : 316
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

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

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

Okay, I was about to say. tongue

Is this solved now ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum