PDA

View Full Version : Switch from right to left cascade...



Osyrys14
02-22-2011, 08:43 AM
1) Script Title: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/

2) Script URL (on DD): Not live yet...

3) Describe problem: I need this menu to cascade left instead of right... Should be simple, right? I can't figure it out, probably from staring at too much code... Anyone got a quick way to switch the popouts?


Osyrys

ddadmin
02-23-2011, 08:13 AM
By default the script will automatically left position a sub menu if it's too close to the browser's right edge. To force it to do this always, try locating the below chunk of code inside the .js file:


var menuleft=(this._istoplevel? this._offsets.left + (dir=="sidebar"? this._dimensions.w : 0) : this._dimensions.w)
if (submenurightedge-scrollX>ddlevelsmenu.docwidth){
menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)
}


and change that to:


var menuleft=(this._istoplevel? this._offsets.left + (dir=="sidebar"? this._dimensions.w : 0) : this._dimensions.w)
menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)

Osyrys14
02-26-2011, 04:06 AM
I changed that code, and it disabled all submenus.. I also made it live so you can see what I mean. It even took the arrows out. Here's where I have what is the basic code from your site, modified as mentioned above...

http://2monkey.holisticschool.com/demo/demo2.htm

Osyrys14
03-01-2011, 09:23 AM
Any luck with this, I'm kinda in a pinch getting it working... I know you're busy...

ddadmin
03-01-2011, 07:50 PM
Sorry for the delay. There is a closing curly bracket you should have removed (code in red below:


var menuleft=(this._istoplevel? this._offsets.left + (dir=="sidebar"? this._dimensions.w : 0) : this._dimensions.w)
menuleft+= -this._dimensions.submenuw + (this._istoplevel && dir=="topbar" ? this._dimensions.w : -this._dimensions.w)
}

Try removing it from your .js file...

Osyrys14
03-02-2011, 10:17 AM
Same result.... No submenu... Tried it local and live

Osyrys14
03-02-2011, 10:20 AM
Nevermind, I missed something... it's popping left now... Any chance on changing the arrows to the left as well?

Osyrys14
03-03-2011, 04:29 AM
Please check out...

http://2monkey.holisticschool.com/

When I changed the size to fit the page area, you can't get the menus to pop open... When I leave it at 175 width, the menus only pop open over the arrow, and won't allow to slide to the left to get to the submenu... Where can I change this? (may as well give the completed product to you to put on the site as a left cascading menu once we're done... )

Osyrys