View Full Version : Smooth Navigational Menu (v2.0)

05-11-2013, 04:12 AM
1) Script Title: Smooth Navigational Menu (v2.0)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem:
I will admit now that I am not a programmer. :o
I downloaded all the files and thought I had followed the directions but I cannot get the menu to drop down for the submenus.
I have it here: http://religiousright101.tripod.com/SawHorse/index1.html to test it.

I have tried so many different things trying to fix this, including copying some of the files into the head section directly. This is exactly the drop down menu I need - If I could just get it to work.
Any help is appreciated. If I need to pay to get it working, then let me know.

Thank you!!:confused::

05-11-2013, 06:13 AM
There may be other issues, but the reference to ddsmoothmenu.js in the HEAD section of your page is currently broken. Be sure it's uploaded to the root HTML directory of your site:


05-11-2013, 07:35 AM
Also - The page is missing the required init, which for it could be:

<script type="text/javascript">

mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]


This should go right after:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="ddsmoothmenu.js">

* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code


All of which, though not critical, should go after the styles.

There could also be other problems.

The browser cache may need to be cleared and/or the page refreshed to see changes.

05-13-2013, 05:07 AM
Thank you both for your help.

I scrubbed all my fiddling with it and deleted the scripts - then downloaded the scripts from DD anew.
The drop down is working now!!! That is huge. You guys ROCK. I will definitely recommend you and use your scripts again.
You have won me over with your friendly assistance!


05-14-2013, 01:52 PM

Thanks for this great script. 2 questions:

1. How to fix a top offset on .ddsmoothmenu ul li ul
It seems adding top:20px has no effect. The idea is to make something like on the attached screenshot 5058

2. how to add dynamically a class to .ddsmoothmenu ul li ul when the submenu reposition themselves if too close to the window's right edges.



05-14-2013, 02:08 PM
I'd try padding-top. The script sets the top coord on the fly so as to position it under its trigger regardless of how the page might have been resized, which of course might have moved the trigger.

The padding might also be set by the script and/or in the stylesheet. If so, you may have to use the !important keyword to override that.

Padding is a good choice too because you could use that little arrow thingy as a background image. Background shows in padding. And padding is a part of the element, so hover events (if used) and clicks still should be recorded faithfully for each element.

05-14-2013, 02:59 PM
Thanks for reply. That work fine8 What about second question. The little arrow as a background image should be replaced if the submenu is repositoned. In this case adding dynamically a class to .ddsmoothmenu ul li ul would be nice

05-14-2013, 03:50 PM
I missed that. Try this (lightly tested) modified version of the script (right click and 'Save As'):


It adds the class 'repositioned' to menus that have been repositioned and removes it from those that have not. Should work.

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

05-14-2013, 04:14 PM
It works like a charm :) Thanks a lot

05-15-2013, 02:50 AM
I spoke too soon.
It works in Firefox, but not in IE.

Help please. I don't understand why it won't work in IE.

05-15-2013, 06:42 AM
Oh, it's working fine in IE (mostly, a standards invoking DOCTYPE for the page would be a good idea), but the Flash slideshow is covering its drop downs. To fix that, add the highlighted as shown:

<!---------FLASH BANNER------->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
ID=home-page WIDTH=943 HEIGHT=509>
<PARAM NAME=movie VALUE="home-page.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=true>
<PARAM NAME="wmode" VALUE="transparent">
<EMBED src="home-page.swf" loop=true quality=high
WIDTH=943 HEIGHT=509 TYPE="application/x-shockwave-flash"
<!---------END FLASH BANNER------->

The browser cache may need to be cleared and/or the page refreshed to see changes.

09-27-2013, 08:45 PM
hi John,

is there any way to use this menu AND display the URL to the page you are viewing in the browser bar?

Im trying to add the twitterwidget to my site, but since the smoothmenu loads the page in a DIV i'm not sure thats even possible.
Can you help?

is the site
for example SEPA
<li><a href="javascript:ajaxpage('pages/projecten/sepa.php', 'content');"class="normal" id="sepa"onClick="changeActiveStates('http://foo', this)"><span>SEPA</span></a>
will still display http://www.phalanxes.eu in the brwoser bar.

thanks in advance,


09-28-2013, 02:31 AM
This is an old thread, and your question doesn't actually relate to the smooth menu script. It's the AJAX page script that's being used by the links in the menu to load pages into the target div.

I'm not sure if you can have it both ways, load via AJAX and have the page URL change. Probably not. One of the main objectives of the AJAX page script is to load differing contents into the same page without changing the or reloading page. If you were to abandon the AJAX page script and use normal links to the other pages, that would take care of the problem of the URL not changing, but you would need full pages. Right now it apparently just has page fragments that get loaded into the main page. I say "apparently" because if I navigate to the pages, I get full pages. But server side code is probably being used to do that. Or not, I can't tell for sure. No one can see the server side code without access to it. But the pages have .php extension, so that implies that server side code is, or at least could be, being used.

Oh, and that's not even the latest version of the smooth menu, neither is the one in this thread, but that's newer than the one on the page you linked to.

In any case, please start a new thread for a new question.