How can I get the full package for this modified version?
How can I get the full package for this modified version?
Hi Ictinus,
Excellent, nice bit of work. However...
As I am new to javascript and css, how would you go about changing the background color/images of individual menu headers?
I can add another selector(image1) within the span class, e.g.
<span class="title image1"><span class="tt">Test Menu</span></span>
but this needs to be handled in the .js file to work.
And I can't get this working correctly. Any help would be welcome.
Thanks,
RobbyS
Figured it out. Thanks.
Last edited by RobbyS; 07-25-2007 at 12:59 PM.
I have used DimX Slashdot menu on my web site and cannot seem to initialize it as I would like. Currently it is used just as downloaded from DynamicDrive, but I find that some customers do not realize they can collapse menu by clicking. I simply want all menus to be in the collapsed state when the site is opened. If possible, once a menu is opened then the cookie would store and open the same menu position on each page as it is opened.
I have tried the initialization options that DimX specified without success. This is my first web site and I am untrained in Java Script. Help is very much appreciated.
http://www.mcgymswim.com
Regards - bsquared
Dumb question, but where do the above files come from? There aren't in the original DimX versionsdnestedmenu.js
sdcollapsed.gif
sdcollapsedOn.gif
sdexpanded.gif
sdexpandedOn.gif
and these if you want the Slashdot style:
sdnestedmenu1.css
sdtitle.gif
sdtitle2.gif
Thanks for any input
bsquared,
I see you've modified your site to collapse all menus but the first by default and also to not use cookies.
Now that you are forcing your initial state as you wish, does the cookie remembering not work as you wish?
Some thoughts on your pages...
* You appear to have two the SDMenu init specified twice on each page. One at the top, one toward the bottom. Do you actually need both?
* If you want to remember the state of each menu (on different pages) I think DimX's sdmenu cookies will work for you if you just name your menu divs with a different name. ie. <div id="menu_about"> and <div id="menu_swim"> rather than just <div id="my_menu">. Of course you'll need to change the init calls to reflect the name changes too.
* the older design of DimX's sdmenu which I modified may be more forgiving on your long menu text. eg. 'Did you know?' appears as 'Did you' on my browser because of font size differences. (however, handling multiple menu cookies will not work in the same way as described above... at the moment).
Cheers,
vagrant,
all of the files you list can be grabbed directly from the link in my signature.
eg. add the filename in question to the end of the url:
http://www.ictinus.com/sdNestedMenu/
Cheers,
Ictinus,
Thank you for your reply.
* The comment concerning the text on the menu header was especially helpful since I have received no feedback on that point. Curious about the browser you are using. I took the cowards way out and renamed it shorter. Life is just getting in the way of writing this site so time is limited.
* I removed the first of the SDMenu init specified twice on each page which you pointed out. Thanks. I started with this site knowing nothing about this stuff 3 months ago; I did have a vision though. I could probably clean my code considerably now by revisiting it.
* The cookie is working correctly since I modified the sdmenu.js file to : this.remember = false;. The reason I had to do this is the page Season Standouts under the gymnastics menu has numerous menu headers and the cookie was messing up the open state of all the other pages after a visit.
After catching up on business, I'll be starting a new design using what I've learned and will save your pointers. Thanks again.
Best Regards - bsquared
Hello Ictinus,
I am currently developing a website with some friends. Up to now we have been using DimX's version of the slashdot menu. To view what we have so far visit http://students.washington.edu/saloh...t/layout1.html
Being able to use nested menus will dramatically help our navigation menu.
You'll notice that we are using several iframes to display all the content. I am having difficulty having a menu item open a page in the content iframe and at the same time expand to show its submenus.
I've tried to edit Menu 3 and 4 to perform said task. But when entries are placed within the <div class="submenu"> tag, the original menu link, to say google.com, no longer functions.
Can you help?
Thanks for your time and excellent menu. Cheers
salohcinzero,
Can you provide a link example of the menu that is not working as you require.
Cheers,
Ictinus,
Your modification to the Slashdot menu is great. I have made a modification to the script sdnestedmenu.js to use <ul> tags instead of <div> tags.
You can see the example at http://www.studio505.com/site3
Everything seems to work fine, except that after I click on Menu 1.1 (a third level menu), I cannot get Menu 1 to close up completely when clicking one of the other top level menus. Menu 1 only closes up to the Menu 1.1. after Menu 1.1 is open. Any suggestions on ways to resolve?
Changes made to sdnestedmenu.js shown in blue:
menu = getElementsByClassName("sdmenu", "ul", document)[0];
titles = getElementsByClassName("title", "span", menu);
submenus = getElementsByClassName("submenu", "ul", menu);
titletext = getElementsByClassName("tt", "span", menu);
Last edited by studio505; 08-12-2007 at 05:28 PM. Reason: change highlight color to clarify text
Bookmarks