Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 12-13-2004, 07:53 AM   #1 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
hide/ show sidebar through DHTML

Gotta have a hide/show sidebar similar to the one at:

http://www.sciencedaily.com/

To see it in action, go to sciencedaily.com, and click at the button saying "Menu" in the top left corner.

How is it done? Through DHTML or Javascript? I was unable to find the exact code that does that. Opinions?
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2004, 10:10 AM   #2 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,821
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
DHTML
one of the first tricks I learned.

put menu in div, give div an ID
Code:
<div ID="the_menu">....</div>
make a button to evoke the JavaScript function you have to show/hide the menu.
Code:
<a href="javascript: toggleMenu();">MENU</a>
Write the fucntion...
Code:
function toggleMenu() { menu = document.getElementById("the_menu"); if (menu.style.display == "block") menu.style.display = "none"; else menu.style.display = "block"; }
(untested, any problems its surely something easily resolved).

Any other things you'de like to know/do?
(I've been thinking of making them into tutorials for a web site).
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt

Last edited by LazyJim : 12-13-2004 at 10:16 AM.
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How create a sidebar on my blogger blog?? rony888 Blogging Forum 2 12-19-2006 01:43 AM
Friday Night Lights (tv show), and House (tv show) sim Forum Lobby 0 10-31-2006 05:13 PM
Three column CSS layout right sidebar problems kerflop Coding Forum 1 10-13-2006 12:46 PM
Blog: How to show more than 10 recent entries in the sidebar Tariel Zivzivadze Google Forum 1 02-22-2005 06:02 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:09 AM.
© Copyright 2008 V7 Inc