Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • Hiding submenu
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
Hiding submenu
Tweet Topic Started: Apr 24 2009, 11:52 PM (311 Views)
PD.Phoenix Apr 24 2009, 11:52 PM Post #1
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
Ok, I know I've seen it multiple times on this board, but looking through the indexes, using the search function and manually checking multiple threads I can't find, nor remember which is why I'm looking, how to hide the submenu...

=\
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
Reid Apr 25 2009, 12:04 AM Post #2
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Code:
 
$("#submenu").hide();
or
Code:
 
document.getElementById('submenu').style.display='none';
Edited by Reid, Apr 25 2009, 12:05 AM.
The Resource Board
Offline Profile Goto Top
 
PD.Phoenix Apr 25 2009, 12:09 AM Post #3
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
Thank you.
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
Vitality Apr 27 2009, 08:44 PM Post #4
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
You can also do this through CSS:
Code: HTML
 
#submenu {
display:none;
}
Offline Profile Goto Top
 
Reid Apr 27 2009, 09:37 PM Post #5
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Vitality
Apr 27 2009, 08:44 PM
You can also do this through CSS:
Code: HTML
 
#submenu {
display:none;
}
I swear, I think CSS escapes me at every turn.. it seems like it. I never notice a way to do anything with CSS. :P
The Resource Board
Offline Profile Goto Top
 
HolySavior Apr 28 2009, 11:48 AM Post #6
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
use the CSS way. its quicker and will still hide it even if the people have JS off.
Offline Profile Goto Top
 
Reid Apr 28 2009, 03:07 PM Post #7
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
HolySavior
Apr 28 2009, 11:48 AM
use the CSS way. its quicker and will still hide it even if the people have JS off.
But with a script that changes the way the submenu looks, hiding it for everyone isn't effective, since those without JS will still want to see the submenu even if they don't have JS enabled.
The Resource Board
Offline Profile Goto Top
 
HolySavior Apr 28 2009, 03:26 PM Post #8
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
but your hiding the submenu anyways. if your making a custom submenu you are using your own CSS and HTML anyways.
Offline Profile Goto Top
 
Viral Apr 28 2009, 03:45 PM Post #9


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
Actually, Reid has a point. If he is making a custom submenu, JavaScript is the best way to hide it. That way, if JS is turned off, the default submenu will show. If it's turned on, it will be hidden, but another JS code can be used to grab the data from that submenu and stick it into the new one.

Posted Image
Offline Profile Goto Top
 
PD.Phoenix Apr 28 2009, 07:35 PM Post #10
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
My slider submenu still works even if you turn javascript off.

When you turn Javascript off, the slider menu breaks down and the slider turns off. The rest of the submenu itself it still there.

:P
Edited by PD.Phoenix, Apr 28 2009, 07:37 PM.
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code University · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 7:48 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy