Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
dynamic drive menu opens expanded
Old 01-17-2011, 02:13 PM dynamic drive menu opens expanded
matt w's Avatar
Super Talker

Posts: 136
Location: kalamazoo
Trades: 0
Hello again,
my dymamic drive slashdot menu is working, but when a browser opens it for the first time, it displays expanded. Do you know how to set it to display collapsed when a browser first opens the page?
Many thanks,
Matt
http://www.recoverymi.org/basic%20sl...t_portada.html
matt w is offline
Reply With Quote
View Public Profile Visit matt w's homepage!
 
 
Register now for full access!
Old 01-17-2011, 02:29 PM Re: dynamic drive menu opens expanded
Extreme Talker

Posts: 246
Trades: 0
Try the following:

var myMenu;
window.onload = function() {
myMenu = new SDMenu("my_menu");
myMenu.init();

myMenu.collapseAll();
};
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 01-17-2011, 02:37 PM Re: dynamic drive menu opens expanded
matt w's Avatar
Super Talker

Posts: 136
Location: kalamazoo
Trades: 0
Dear stbuchok,
This works fine, but one of the best features of this menu is that it "persists menu states" that is, it keeps it's form as you move from page to page. So can I alter it so that it keeps it's form once you start using it, but opens just the first time collapsed?
Thanks,
matt w is offline
Reply With Quote
View Public Profile Visit matt w's homepage!
 
Old 01-17-2011, 10:54 PM Re: dynamic drive menu opens expanded
matt w's Avatar
Super Talker

Posts: 136
Location: kalamazoo
Trades: 0
I need to write a script that collapses the menu
Quote:
myMenu.collapseAll();
when it doesn't find a particular variable, then write a cookie that deposits that variable after the first time a page on the site has been visited. Right?
matt w is offline
Reply With Quote
View Public Profile Visit matt w's homepage!
 
Old 01-18-2011, 04:59 AM Re: dynamic drive menu opens expanded
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
That will work.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to dynamic drive menu opens expanded
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85335 seconds with 12 queries