PDA

View Full Version : Smooth menu - submenu offset



enchant1
08-25-2014, 04:26 PM
1) Script Title: ddsmoothmenu

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

3) Describe problem:

When a user hovers over a main selection on a horizontal menu, the sub menu drops down aligned left with its parent. Is it possible to have it drop down some distance offset to the right, maybe 30 px?

ddadmin
08-26-2014, 04:42 PM
Try finding the below line inside the .js file, and change 0 to 30:


var menuleft = orient === 'down'? 0 : dimensions.w;

This will offset the top level drop down menu 30 pixels to the right of the main anchor bar, while leaving sub sub menus still showing flush against its parent sub menu. I assume this is what you want, instead of offsetting every sub menu level 30 pixels to the right of its parent.

enchant1
08-26-2014, 04:56 PM
The line in my script looks a little different, but the '0' was definitely there. Changing it did exactly what I needed. Thanks!