PDA

View Full Version : Trying to make modifications to Arrow Side Menu



BryanC
01-22-2010, 10:52 PM
1) Script Title: ddaccordion.js

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-arrow.htm

3) Describe problem:
First off. Awesome script very easy to work with. I've just run into one thing I can't figure out. There's three parts to this...

#1 I would like to apply a:active effects on all menu and sub-menu items, including menu items that do not have sub-menus.

#2 Keep the background effects in place on menu items with sub-menu items.

#3 Close any open sub-menus when you click on a menu item that does not have sub-menus.

Stated differently, I think what I'm looking for is a <div class="menuheaders"> function/exception that allows menu items with or without sub-menu items to interact with each other, and if the menu item does not have a sub-menu item then it should not show the background image.

Thanks for any ideas.

BryanC
01-24-2010, 07:20 AM
If my question isn't clear enough, please let me know so I can try to explain. Thanks!

BryanC
01-26-2010, 05:36 PM
Ok, I have gone ahead and gone live with what I've got, but I would really love to be able to put the finishing touches on it. Here is the site where I'm using the script. See the left hand nav:

http://imagearchive.avnet.com/branding/

So, as you can see, items with sub-items have a "+" and when you expand them that turns into a "-" and the text glows indicating selected. I would like to keep that behavior.

What I need to add to this is:

1) when you select a menu item that does not have sub-items. Close any open menu, and make the new selected menu item glow.

2) make a selected sub-menu item glow only when it is selected.

...and it's a given, have any item that is no longer selected quit glowing. Selected items will be Active link items, and if I need to loose the glow on a root menu item to have a sub-menu item glowing, that's an acceptable resolution as well.

Any ideas? Thanks in advance.

BryanC
01-27-2010, 06:15 PM
Ok, so what's the policy on code changes? If I hack at the script code to try to get it to do what I need should I send the modified version back in or how does this work?

I'm puzzled that I've had zero replies to this. Is it really that weird of a question?

djr33
01-27-2010, 06:33 PM
It's not a weird question. It's actually just a difficult question. Most people who get quick replies ask more basic questions, which is unfortunate in your case. I hope someone can get back to you soon (but I don't know the answer). There are a few people here who could do this, I'm sure, but they may have just not had time yet.

As for policy, I can explain that.
You can modify the script as you desire, but the copyright notice must remain, regardless. I'm not sure about "copyrighting" your version of the code (with the DD code underlying), so probably best to just let your version (excluding content, of course) also be free to use/share.
You are not required to submit your changes back, but if you make big changes and think others would find them useful, then that would be great (and you may receive some credit for the update, depending on the details). The scripts here are supported by user feedback, so it's great when updates/changes are submitted.
If you do want to submit the changes, you can post here for feedback, but for actually "submitting" a final version you can use the "submit a script" category (inside this one).
Your changes may or may not be accepted, primarily on the basis of whether they would apply for the general audience. If you modified the script in a major way, it might be added as a separate script; if only a little, as an update or option for the current script.
The administrator of the site ('ddadmin' on the forums) is the only one who really makes decisions, so if you have any particularly specific questions you may want to ask him directly.
I hope this answers your questions in general, though.

BryanC
01-27-2010, 07:15 PM
Thank-you. That does answer my questions. I really wasn't expecting a complete answer. Really I was just hoping for someone to chime in with a "no-way the script doesn't work that way at all" or something :)

I'm thinking that the quickest way to deal with this is to modify the script to handle menu items that have empty sub-menu items by dropping the background. On the surface that seems like it could work.

I say this because I tried making all items menu items and it worked but everything had the background shown (the plus next to it), you got a weird pop effect of it trying to draw a sub-menu and then failing, and it just expanding unrelated sub-menus when you clicked on a menu item that had no sub-menus.

Ok, thanks again for the feedback. If anyone has ideas they want to throw in feel free. In the mean time I'm going to go back to the code and see if I can pull this off. I'll kick back the solution if I can come up with one.

Thanks!