PDA

View Full Version : [DHTML] Slashdot's Menu



DimX
06-29-2006, 03:48 PM
1) CODE TITLE: Slashdot's Menu

2) AUTHOR NAME/NOTES: DimX

3) DESCRIPTION: A DHTML menu that looks much like the one in slashdot.org but is a lot simpler and has a better browser support.
--// Ok, no validation problems anymore. :)
When changing width of the menu, the width of titles and submenus must also be changed and some (2) pictures must be resized (MS Paint is just fine)

4) URL TO CODE: http://roboweb.awardspace.com/sdmenu/sdmenu.zip

5) URL TO DEMO: http://roboweb.awardspace.com/sdmenu/index.html

Twey
06-29-2006, 04:00 PM
can't be validated (this can be corrected using php)But to do so would totally defeat the point of validating :)
It's quite possible to validate this.

index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<title>Slashdot's Menu</title>
<link rel="stylesheet" type="text/css" href="menufiles/menu.css">
<!--[if IE]><link rel="stylesheet" type="text/css" href="menufiles/menuie.css"><![endif]-->
<script type="text/javascript" src="menufiles/menu.js"></script>
</head>

<body>
<div class="sdmenu">
<span class="title" id="top"><img src="menufiles/expanded.gif" class="arrow" alt="-"> Online Tools</span>
<div class="submenu">
<a href="http://tools.dynamicdrive.com/imageoptimizer/">Image Optimizer</a>
<a href="http://tools.dynamicdrive.com/favicon/">FavIcon Generator</a>
<a href="http://tools.dynamicdrive.com/emailriddler/">Email Riddler</a>

<a href="http://tools.dynamicdrive.com/password/">.htaccess Password</a>
<a href="http://tools.dynamicdrive.com/gradient/">Gradient Image</a>
<a href="http://tools.dynamicdrive.com/button/">Button Maker</a>
</div>
<span class="title"><img src="menufiles/expanded.gif" class="arrow" alt="-"> Support Us</span>
<div class="submenu">

<a href="http://www.dynamicdrive.com/recommendit/">Recommend Us</a>
<a href="http://www.dynamicdrive.com/link.htm">Link to Us</a>
<a href="http://www.dynamicdrive.com/resources/">Web Resources</a>
</div>
<span class="title"><img src="menufiles/expanded.gif" class="arrow" alt="-"> Partners</span>
<div class="submenu">
<a href="http://www.dynamicdrive.com">FlamingText</a>
<a href="http://www.dynamicdrive.com">Marketing Find</a>
<a href="http://www.dynamicdrive.com">01webdirectory</a>
<a href="http://www.dynamicdrive.com">AnfyJava</a>
</div>
</div>
</body>

</html>menuie.css:
.sdmenu .title, .sdmenu .titlehidden, .sdmenu .submenu a {
width: 150px;
height: 25px;
}

DimX
06-29-2006, 04:09 PM
Oh, of course, :) this is much simpler way.

ddadmin
06-30-2006, 12:06 AM
Very nice, and of course, made even better with Twey's validation changes. Can I assume that while the menu style is inspired by Slashdot, the code/images are all original?

DimX
06-30-2006, 07:11 AM
The images are from slashdot.org, but the code is written completly by me (slashdot's code is too heavy :p )

ddadmin
06-30-2006, 08:30 AM
Thanks for the info. I'll definitely consider featuring this script on DD after reviewing it more closely in various browsers. I'll also need to come up with original images, as I'm sure you're aware things like images are copyrighted.

Twey
07-04-2006, 03:34 PM
I'll also need to come up with original images, as I'm sure you're aware things like images are copyrighted.Not on Slashdot, I wouldn't think. I don't see an explicit copyleft anywhere, but I'm sure if someone asks them they'd say the images are Free.

ddadmin
07-06-2006, 05:32 AM
Ok, script now posted to DD: http://www.dynamicdrive.com/dynamicindex1/slashdot.htm :) I've made some minor changes to the images, plus cleaned up the CSS so to remove the extra IE only CSS file.

If you do make any updates/ improvements to the script, it'd be great if you could do so off the zip file posted on DD, just so we're all on the same page.

Thanks!

dmurray14
07-07-2006, 06:40 PM
Thanks for the nav bar, I love it. However I do have two requests, if I may...

1) is it possible to make it so all the menu items are closed on page load?

2) Possible to have other open menu items close when another is selected? Ie, I select menu item one, it expands. I select menu item 2, and it expands and closes menu item one.

Thanks a lot, much appreciated!

Dan

Twey
07-07-2006, 08:09 PM
var n = navigator.userAgent;
if(/Opera/.test(n)) bypixels = 2;
else if(/Firefox/.test(n)) bypixels = 3;
else if(/MSIE/.test(n)) bypixels = 2;This script still uses browser detection, I see.

jjmunyan
07-08-2006, 11:55 PM
I agree that having the menus default state collapsed would be valuable. For me I have a pretty big navigation bar with about 100 items. I can't see anyone wanting to contract the list from an expanded state. If it is collapsed I could see them wanting to expand it.

If the menu is short enough to come uncollapsed why would anyone contract it?

Thanks for your hardwork though - it is quite a feat what you have so far.

John

NSOrg
07-09-2006, 12:53 PM
How to add expand collapse all


<a id="expandAll">expand</a> and <a id="collapseAll">collapse</a> all

kriskl
07-10-2006, 08:36 AM
1) Script Title: Slashdot Menu


Hi! i was trying out Slashdot menu, it works great! thanks. However after i tried single navigation bar i.e. "Home" in IE 6 i noticed div tag, is shown, even though it is empty, in FF it does not show,

here's example

http://kriskl.gotdns.com/riga2/menuval.php

Anyone maybe knows, what is best approach to this problem, how to create not expandable bar in this menu?

its_jon
07-10-2006, 01:01 PM
Hi.

Im a newb web designer.
This is a great menu but im having trouble working out how to make a chosen sub menu appear collapsed on first pageload.



If its the JS file I have to adapt. what do I need to add. ?

many thanks
JOn.

dmurray14
07-10-2006, 04:42 PM
Here's what I'm looking to do, from the other thread. If anyone could figure it out, I would be very grateful!

When the page loads for the first time, all menus should be collapsed. Every time a sub menu is clicked on and expanded, I'd like any other open submenus to close. I don't want more than one menu open at the same time. I'd like it to continue to remember which menu is open throughout pages, but again, I only want one open at a time. This possible?

Thanks!

Dan

ddadmin
07-10-2006, 06:32 PM
Ok guys, please try and not post requests or solicit help in the "Submit a DHTML" forum. You should just start a thread in the Dynamic Drive scripts help forum (http://www.dynamicdrive.com/forums/forumdisplay.php?f=2). I've made a note of the requests above, and perhaps the original author may also be interested in some of these suggestions for future updates to the script.

I will say the ability to expand/contact all of the menu sections, plus specify certain sections to be contracted initially, is a useful feature, and most likely will be added one way or another the next time it's updated, whether by me or the author himself.

kriskl
07-10-2006, 07:21 PM
Thanx a lot!

immts
07-11-2006, 08:45 PM
This is a very nice menu script!

It would be awesome if it worked on Safari. I wished that I didn't care, but unfortunately I do ;-)

The actual slashdot's menu seems to work everywhere, as does this menu which seems to use a similar mechanism for expanding and collapsing (or at least, the effect) as DimX's

xtree
07-18-2006, 06:39 AM
How to add expand collapse all
Sorry to bother, but I'm a little new in this area :P , would you tell where should I insert the code "<a id="expandAll">expand</a> and <a id="collapseAll">collapse</a> all"?

My problem is that I have too many categories and I need it to load collapsed. Here's the code, but I don't know where to put it.

Thank!

ddadmin
07-25-2006, 01:07 AM
Ok, just a note that the Slashdot menu on DD has now been updated for a contract/ expand all function: http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

marklbishop
07-25-2006, 09:26 PM
This is a great script! :) Thanks.

The expand/contract buttons are very helpful, but the default contract doesn't seem to work for me.


var contractall_default = true;

Still, it defaults to expanded.

Any thoughts?

Thanks.

ddadmin
07-25-2006, 09:33 PM
Do you have persistence enabled as well directly above that line? If so the persistence takes precedence over the contract all feature. To confirm this, turn persistence off.

marklbishop
07-25-2006, 10:10 PM
Do you have persistence enabled as well directly above that line? If so the persistence takes precedence over the contract all feature. To confirm this, turn persistence off.

Actually it seems to me that to turn persistence off goes against the idea of wanting the menu to follow the user.

How about this...


function restore() {
if(getcookie("menu") != null) {
var hidden = getcookie("menu").split(",");
for(var i in hidden) {
titles[hidden[i]].className = "titlehidden";
submenus[hidden[i]].style.height = "0px";
submenus[hidden[i]].style.display = "none";
arrows[hidden[i]].src = "media/collapsed.gif";
}
}
else if (contractall_default) //DD added code
slash_contractall() //DD added code
}

Put the slash_contractall into the restore function. That way if the Menu cookie is null, it contracts the menu. If the Menu cookie is not null, it leaves persistance as it is.

Thoughts? This seems to work for me.

ddadmin
07-25-2006, 10:31 PM
Put the slash_contractall into the restore function. That way if the Menu cookie is null, it contracts the menu. If the Menu cookie is not null, it leaves persistance as it is.

Thoughts? This seems to work for me.

It's really a matter of preference and how you define "persistence". If the menu cookie is null, it actually means the user has chosen to have all menu items expanded. The persistence feature as is honors this, and the next time the page loads, all menu items are expanded.

mgisonno
07-26-2006, 02:17 AM
This script is perfect, except for one minor flaw in my case. I'm trying to use it on multiple pages. Unfortunately, instead of looking for the cookie and replacing / updating it... it creates a new cookie every time you navigate to a new page with the navigation on it. Anyone have any ideas?

ddadmin
07-27-2006, 07:36 AM
To make the persistence/ cookie site wide, find the line:


document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate);

inside menu.js, and change that to:


document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";path=/; expires="+exdate);

barrett01535
07-28-2006, 10:12 PM
dmurray14 asked for 2 improvements to slashdot - No1 is sorted great - but is any of you great minds working on No2 (contracting the previous menu item whenever a new menu item is opened?
I look forward to a new updated slashdot menu
Cheers


Thanks for the nav bar, I love it. However I do have two requests, if I may...

1) is it possible to make it so all the menu items are closed on page load?

2) Possible to have other open menu items close when another is selected? Ie, I select menu item one, it expands. I select menu item 2, and it expands and closes menu item one.

Thanks a lot, much appreciated!

Dan

mgisonno
07-31-2006, 03:45 PM
Does anyone know what would cause this error?

"titles[hidden[i]] has no properties"
"Line 61 in menu.js"

From firefox.

Is it conflicting with another script on my site?

Basically, everything on the page loads, but the engines are still churning. The slashdot nav is un-usable for about 30 seconds, at which time the browser stops churning and the menu becomes expandable / contractable. Then the error above is goes into the javascript console log as an error.


Does the same thing in IE, but I've heard firefox errors are better.

mitchepa
08-02-2006, 03:50 PM
Hey all, i love the slashdot menu, unfortunately I seem to be having trouble with conflicting scripts. What i want to do is include a line of code in the body tag loading that will load both scripts at the same time.

Example:

SCRIPT 1: window.onload=dothis
SCRIPT 2: window.onload=dothat
RESOLUTION: <body onload="dothis();dothat()">

What ive come up with so far

<body onload="function(){enableTooltips("Content"); <---Need to know what to pull from the slashdot menu.js to put here --->">

Thanks for your help
Paul

ddadmin
08-02-2006, 06:41 PM
Mitchepa:
Simply remove the line:


window.onload = init;

from menu.js, and add it to your BODY like so:


<body onload="enableTooltips('Content'); init()" >

DimX
08-14-2006, 11:04 AM
Okay, I've updated the menu and fixed some bugs:

if browser isn't Opera, MSIE or Firefox then bypixels remained undefined (browser detection removed)
if cookie is null the contractall_default is also checked.
cookie path added
images directory variable added
removed text cursor when hovering above the title
...

ZIP file: Download (http://roboweb.awardspace.com/sdmenu/slashdotmenu.zip)
Demo: Link (http://roboweb.awardspace.com/sdmenu/slashdotmenu.html)

nickfourmillion
09-02-2006, 11:49 AM
This works great now!
But.... still having one small browser problem; works on Safari, firefox for PC and MAC, MSIE for PC, but NOT on MSIE on a MAC.

Do any of you know how I can rectify this?

Am pretty new to this so please let me know exactly where the neccesary code goes, and what it does.

thanks.

silverccrow
09-28-2006, 02:39 AM
I want to use your script in 2 columns and i have some problems with that

I modify the variables in a new .js but if you click one of the sides menu for example item number 4 in the right comun the item number 4 in the left column also expands or contracts
can u help me with that? I want to use your code

thanks a lot ;)

Mikedamiz
10-10-2006, 05:21 AM
Hey guys! I love this script i have one question how can i make it 100% load default uncollapsed? I reason i ask is even with:
var remember = false;
var contractall_default= true;

When my page loads for a split seconds they are all collapsed ( i have about 50 items in it so it screws up my site for a few seconds)... Anyways i know this must be possible, just look at Digg... Anyways anyone have any suggestions? Thanks

Mikedamiz
10-12-2006, 01:39 AM
Also does anyone know how to make it so when ur hovering over the main categorie to expand it, it is a hand, not a typing cursor on the mouse thing?

DimX
10-12-2006, 08:07 PM
Download the new version (this thread, post #31) and you'll get the hand cursor.

nickfourmillion
10-17-2006, 05:52 PM
In Firefox, My menu forces the page size of the front page of my site to add extra white space, as if it was allowing enough room for a fully expanded menu, even though the menu contracts by default.
oddly, as soon as I resize the browser window, this problem is corrected. I've no idea how to remedy this.
here's the link to the site i'm talking about:
www.playtoyshops.com
obviously you'll need to view in Firefox (MAC or PC) to see the problem. scroll down to see all the white space added (the final logo should sit just under the banner)

can anyone help with this?
Nick

sjmorris
10-21-2006, 10:52 AM
Actually it seems to me that to turn persistence off goes against the idea of wanting the menu to follow the user.

How about this...


function restore() {
if(getcookie("menu") != null) {
var hidden = getcookie("menu").split(",");
for(var i in hidden) {
titles[hidden[i]].className = "titlehidden";
submenus[hidden[i]].style.height = "0px";
submenus[hidden[i]].style.display = "none";
arrows[hidden[i]].src = "media/collapsed.gif";
}
}
else if (contractall_default) //DD added code
slash_contractall() //DD added code
}

Put the slash_contractall into the restore function. That way if the Menu cookie is null, it contracts the menu. If the Menu cookie is not null, it leaves persistance as it is.

Thoughts? This seems to work for me.



Thanks for this, I had the same problem and it's fixed. Good show.

espider
10-30-2006, 04:55 PM
Thank for the nav, it's cool but I have a quick question.

Is it possible to have a link chosen by a user to be marked with the some background color on the chosen page?

Thanks a lot for any help.

DimX
10-30-2006, 07:14 PM
Okay, here's an update, I added a mark_current variable, which, if set to true, marks current page-link in the menu (look into css for customization).

ZIP file: Download (http://roboweb.awardspace.com/sdmenu/slashdotmenu.zip)
Demo: Link (http://roboweb.awardspace.com/sdmenu/slashdotmenu.html)

espider
10-31-2006, 07:04 AM
Thanks DimX very much, you saved my life because my client required the feature and I didn't know what to do. Ones again many thanks. If you would like to have a look at the menu, go: http://www.espider.com.au/client_web/faj/01_CORPORATE/01_1_greetings.html

The website is still under construction and in Japanese so you may have some funny characters.

Cheers

DimX
10-31-2006, 07:18 AM
You're welcome ;)

bakerballs
11-01-2006, 07:27 PM
When I open your menu it gives the following language problems...

...To display language characters correctly you need to install the following language pack:
Baltic

How can I uninstall baltic or remove this error. I just want to use english and arial font

DimX
11-01-2006, 08:21 PM
Sorry, its because the encoding in meta tag was set to baltic (iso-8859-13).
I changed it to utf-8.

jolly_jonesy
11-03-2006, 10:46 PM
Hi sorry to ask the same question again however I really need this....

Is it possible to have other open menu items close when another is selected? Ie, I select menu item one, it expands. I select menu item 2, and it expands and closes menu item one.

So important for making the website look neat and tidy..

Please Please add it... I don't mind chucking you some cash for doing it...

Jolly

t_anjan
11-13-2006, 03:25 PM
The menu works on Opera when on my HDD. But when I upload it to my server, the menu doesn't respond at all on Opera. It works fine on the other browsers. What could be the problem?

The menu works properly on the Dynamic Drive page also. Is there any setting I have to activate on the server?

BTW, the http://roboweb.awardspace.com/sdmenu/slashdotmenu.zip link is not working as of this moment.

Edited: Oops, I just noticed which sub-forum this thread is in. Sorry!

t_anjan
11-13-2006, 05:01 PM
Answering my own question:
I had the "Mask as Mozilla" option on in the "Site preferences" for the domain in question.

Apparently, the "Mask as Mozilla" option does not gel with this script. As soon as I switched the setting from that to anything else, the menu started to work. Even "Mask as IE" worked.

DimX
11-15-2006, 04:34 PM
Update again!
Just added the "One submenu only" feature, so that when you open one submenu, others close.

Download: http://roboweb.awardspace.com/sdmenu/slashdotmenu.zip
Demo: http://roboweb.awardspace.com/sdmenu/slashdotmenu.html

blah33
12-28-2006, 10:14 PM
Is there a way to:
1) Make the cookie site wide (ie one setting for all *folders*)?
2) If there is no saved preferences (cookie) collapse some menu positions by default?

This would make this script a real gem!

danf.1979
01-04-2007, 05:30 PM
Hi! Hey, great menu!

I have a problem though, "remembering" does not work well for me... I did check what was being written to the cookie and then what restore function was reading... and it was different sometimes??? Puzzling for me, because I'm a newbie to javascript.
Any way, if I try 2 or more times to "save" the menu in a given stage, it works ok, but If I have the menu in, for example, 1 and 3 opened, reload the page and then change to 1,4,7 and reload again, then the nextime the page loades, the menu has the wrong titles opened...

I'm using this to generate my menu, I think its ok, but leave it here anyway:


$menu = '<div class="sdmenu">';

$menu .= ' <span class="title" id="top"><img src="'.JS_DIR.'collapsed.gif" class="arrow" alt="-" />'.LAN_MENU_HOME.'</span>';

$menu .= ' <div class="submenu">';
$menu .= ' <a href="'.$api->tpl->turl(PROFILE_DIR."profile.php").'">'.LAN_MAIN_PROFILE.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(PROFILE_DIR."password.php").'">'.LAN_CHANGE_PASSWORD.'</a>';
$menu .= ' </div>';



$menu .= ' <span class="title" ><img src="'.JS_DIR.'collapsed.gif" class="arrow" alt="-" />Tienda</span>';

$menu .= ' <div class="submenu">';
$menu .= ' <a href="'.$api->tpl->turl(STORE_DIR."main.php").'">'.LAN_STORE_PREFERENCES.'</a>';
$menu .= ' </div>';

$menu .= ' <span class="title" ><img src="'.JS_DIR.'collapsed.gif" class="arrow" alt="-" />'.LAN_MENU_CATALOG.'</span>';

$menu .= ' <div class="submenu">';
$menu .= ' <a href="'.$api->tpl->turl(CATEGORY_DIR."main.php", array("type" => "catalog")).'">'.LAN_CATALOG_CATEGORIES.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CATEGORY_DIR."create.php", array("act" => "add", "type" => "catalog")).'">'.LAN_NEW_CATEGORY.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(PRODUCT_DIR."main.php").'">'.LAN_PRODUCTS.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(PRODUCT_DIR."create.php", array("act" => "add")).'">'.LAN_NEW_PRODUCT.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CATALOG_DIR."prefs.php").'">'.LAN_PREFERENCES.'</a>';
$menu .= ' </div>';

$menu .= ' <span class="title" id="bottom"><img src="'.JS_DIR.'collapsed.gif" class="arrow" alt="-" />'.LAN_MENU_CONTENT.'</span>';

$menu .= ' <div class="submenu">';
$menu .= ' <a href="'.$api->tpl->turl(CATEGORY_DIR."main.php", array("type" => "content")).'">'.LAN_CONTENT_CATEGORIES.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CATEGORY_DIR."create.php", array("act" => "add", "type" => "content")).'">'.LAN_NEW_CATEGORY.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CONTENT_DIR."inventory.php", array("type" => "page")).'">'.LAN_PAGES.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CONTENT_DIR."create.php", array("act" => "add", "type" => "page")).'">'.LAN_NEW_PAGE.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CONTENT_DIR."create.php", array("type" => "fpage")).'">'.LAN_FRONT_PAGE.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CONTENT_DIR."inventory.php", array("type" => "news")).'">'.LAN_NEWSS.'</a>';
$menu .= ' <a href="'.$api->tpl->turl(CONTENT_DIR."create.php", array("act" => "add", "type" => "news")).'">'.LAN_NEW_NEWS.'</a>';
$menu .= ' </div>';

$menu .= '</div>';

amirinator
02-16-2007, 04:10 AM
Hey Folks,

If anyone can help me I would appreciate it. I downloaded the latest version that DimX posted on 10/14 and I'm getting a problem. Here is the javascript error:

titles[hidden[i]] has no properties
restore()menu.js (line 74)
init()menu.js (line 55)
[Break on this error] titles[hidden[i]].className = "titlehidden";


This question was asked before but I didn't see a solution to the problem. If anyone could help I would appreciate it.

TIA

DimX
03-18-2007, 09:51 PM
Okay, I've completly rewritten the script (the OOP way) :rolleyes:.
It's now possible to have more than one menu on a single page.
Also the menu is now easily controllable with various functions.

CSS is also rewritten and menu's HTML structure has changed (no more img's on each title).
Just one thing about CSS, current stylesheet uses the :first-child pseudo class, so in IE6 the first (top) title will look like others (no rounded corners). This is easily fixable by giving the top title some class name or id and using it instead of :first-child.

You can also now make a submenu be collapsed, before even script loads, by giving it appropriate class name.

Info & Demo: http://roboweb.awardspace.com/sdmenu/
Download: http://roboweb.awardspace.com/sdmenu/sdmenu.zip

jscheuer1
03-18-2007, 10:07 PM
Looks very nice!

Twey
03-18-2007, 10:29 PM
Yep, looking good! However, don't create functions inside the constructor. For example:
function MyObj() {
this.pr = function() {
return 3;
};
}will create a new function each time a MyObj instance is created, whereas:
function MyObj() {
}

MyObj.prototype.pr = function() {
return 3;
};only creates the function once, then reuses it.

DimX
03-19-2007, 12:11 PM
Thanks Twey :). I've altered the code now.

ddadmin
03-19-2007, 11:03 PM
Great, I'll take a look at the new code soon, and if all is well, update the one on DD to match. Thanks!

greasycorpse
03-21-2007, 12:14 AM
Ive been playing around with the menu, and have it the way I want it...but I am now wondering if there is a way to make the background transparent on the menu so that it will show the page's background underneath. thanks

greasycorpse
03-21-2007, 12:19 AM
Ive been playing around with the menu, and have it the way I want it...but I am now wondering if there is a way to make the background transparent on the menu so that it will show the page's background underneath. thanks

nevermind...seems I am too retarded to figure it out on my own before I ask the question haha

chicagonature
03-22-2007, 02:56 AM
As a newbie, I use the DD instructions to get my code to work, but now with the new code and the index.html page, I'm lost.

I wonder if it would be possible to provide instructions like DD does like:
1) Put this in the <head> section
2) Put this other thing in the <body> section and
3) And insert this information for each parameter

One issue I'm having, using the old code that's currently on the DD site is that I want to have the entire menu collapsed upon entry to my website. And, I'm considering having submenus open up into other submenus.

Instructions that show how to set the parameters using the new code would be wonderful!

Thanks so much!

DimX
03-22-2007, 07:02 AM
... I want to have the entire menu collapsed upon entry to my website. And, I'm considering having submenus open up into other submenus.
To make all menus collapsed by default you must add class="collapsed" to every div inside the menu:


<div class="collapsed">
<a href="...">...</a>
...
</div>

But it's impossible to have submenus inside submenus in this script!

ddadmin
03-22-2007, 08:32 AM
Ok, script updated (http://www.dynamicdrive.com/dynamicindex1/slashdot.htm) on DD to the newest version. Hopefully this will lessen alot of the questions that only pertain to the older version. :)

chicagonature
03-22-2007, 07:49 PM
Thanks! I have everything figured out, except for one thing:

In the new script, there's a line under every link in the submenu. How do I get rid of those?

Thanks,
Mike

chicagonature
03-22-2007, 10:00 PM
Never mind, I figured out the underline thing using:

text-decoration: none;

Thanks for a great script! It really makes my website much more versatile for both myself and my visitors. I really appreciate it.

Mike

Robert13
03-23-2007, 08:56 AM
This is a beautifully elegant little menu. And everything works well in IE and Mozilla. However, in Opera, when the menu is collapsed, the headings are covered in arrows and illegible.

What modification do I have to make to stop this from happening?

Thanks.

Robert

DimX
03-23-2007, 03:26 PM
However, in Opera, when the menu is collapsed, the headings are covered in arrows and illegible.
Hmm, I don't have any problems with Opera (9.10).

What version of Opera are you using? Also do you have the same problem here, on DD: http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

Robert13
03-23-2007, 05:31 PM
7.54. Yes, the same problem arises with the URL you quote. I've been reluctant to update because everything was otherwise working properly. I'll obviously have to do so now.

Thanks for your help, and thank you for your elegant work.

Best wishes,

Robert

leh12345678
03-28-2007, 01:56 PM
Hello DimX,

First of all, I would like to thank you for the nice drop down menu (Slashdot Menu) that you have posted on www.dynamicdrive.com. I am having a problem when I type more than one line of text in the menu headings (when the text wraps around to the second line). When the menu collapses, the second line gets covered over by the menu heading below it so that you only see the first line.

What should I do to the script to make it work no matter how many lines of text I have in the menu heading? I had posted this question yesterday and would really like to find out how to tweak this script to make it work with more than one line of text.

Thanks

Linda

Objectivity
03-29-2007, 09:06 PM
Hello DimX,

First of all, I would like to thank you for the nice drop down menu (Slashdot Menu) that you have posted on www.dynamicdrive.com. I am having a problem when I type more than one line of text in the menu headings (when the text wraps around to the second line). When the menu collapses, the second line gets covered over by the menu heading below it so that you only see the first line.

What should I do to the script to make it work no matter how many lines of text I have in the menu heading? I had posted this question yesterday and would really like to find out how to tweak this script to make it work with more than one line of text.

Thanks

Linda

I haven't played with the new script yet, but if it's like the old one you can work around the bug by using a <br> code. Instead of having "This is a really long line" wrap on it's own, you would tell it, "This is a really<br>long line" and it solves the problem.

At least, it did.

cindysz
04-03-2007, 09:05 PM
Hi DimX,

This is an awesome menu and does work well in Safari (and all other browsers), but the only problem I'm having in Safari is that I cannot get it to remember (store) the last menu state. When I either refresh the page or navigate to another page, it resets the menu in Safari. It doesn't do that with your demo I downloaded, so I'm not quite sure what I'm doing wrong. Ideas?

Thanks!
Cy

cindysz
04-03-2007, 09:15 PM
It doesn't do that with your demo I downloaded,

Scratch this statement...can't get it to remember the menu states in the demo either in Safari...

leh12345678
04-04-2007, 02:08 PM
I haven't played with the new script yet, but if it's like the old one you can work around the bug by using a <br> code. Instead of having "This is a really long line" wrap on it's own, you would tell it, "This is a really<br>long line" and it solves the problem.

At least, it did.
The <br> tag does not work since the problem occurs when the menu closes up and the Main Heading right below covers the bottom half of the Main Heading (the part between the <span></span>tags) right above it.

I hope this description of the problem is not too confusing.

I look forward to your reply.

Linda

maddancer
04-10-2007, 04:56 AM
What an amazing piece of work this little script is. Now, I have one that will probably cause the developer to scream...

How would we go about making this menu system work with more than 2 menu depths?

ie:
- CATEGORY
-----SUBCATEGORY
----------LINK
----------LINK
----------LINK

etc?

At the moment, we can only do:

- CATEGORY
-----LINK
-----LINK
-----LINK

Twey
04-10-2007, 05:49 PM
Oh, that. That's easy, you just have to rewrite the menu from scratch :p

I'd suggest perhaps combining it with one of the other pop-out menu scripts.

mburt
04-10-2007, 08:47 PM
Oh, that. That's easy, you just have to rewrite the menu from scratch
Good, tell them while they're ahead :).

tech_support
04-11-2007, 09:34 AM
I think it's best if you can post all the questions here (http://www.dynamicdrive.com/forums/forumdisplay.php?f=2).

This thread has gone far too long and I don't think people will be bothered to read all this and rather post the same question again.

Closing thread.

I've moved your post Timi to here (http://www.dynamicdrive.com/forums/showthread.php?t=19543)