View Full Version : Flex Level Drop Down Menu

01-26-2010, 08:35 AM
Flex Level Drop Down Menu (http://www.dynamicdrive.com/dynamicindex1/flexdropdown.htm)

Sometomes when menu is long, and window of the browser is not so high ( often happends on wide screen laptops, or 13 inches screens ) menu is showing over the link, becouse I think is not too much space underneath. The worst thing is that when link is on top of page, menu shows partly outside the screen, without posibility of move page up.

Is there posibility to force menu to shows downside?

01-26-2010, 07:40 PM
I also would like an answer to this question.

I know that anylinkmenu has a way to comment this feature out but I haven't been able to find a similar way in Flex Level drop down.



01-26-2010, 08:03 PM
Hi tomwis,

I have the answer for you. In the flexdropdown.js file, comment out the following lines. There are two lines that check for the bottom of the window. I commented them out and it works wonderfully!

//y=(y+$ul.data('dimensions').h > docbottomedge)? y-(anchorsetting.useroffsets[1]*2)-$ul.data('dimensions').h-$anchor.outerHeight()+(anchorsetting.dir=="h"? ($anchor.outerHeight()*2) : 0) : y

//y=(parentlioffset.top+$ul.data('dimensions').h > docbottomedge)? y-$ul.data('dimensions').h+$ul.data('dimensions').parentlih : y


01-28-2010, 02:26 PM
Works perfectly. Great !!! After that I had problem with sub level menu that is showing verticaly. At narrow display vertical submenu appears on wrong side :) But after you advise I have comment additional two line for X dimiension.

// x=(x+$ul.data('dimensions').w > docrightedge)? x-(anchorsetting.useroffsets[0]*2)-$ul.data('dimensions').w+$anchor.outerWidth()+(anchorsetting.dir=="h"? -($anchor.outerWidth()*2) : 0) : x //if not enough horizontal room to the ridge of the cursor
// y=(y+$ul.data('dimensions').h > docbottomedge)? y-(anchorsetting.useroffsets[1]*2)-$ul.data('dimensions').h-$anchor.outerHeight()+(anchorsetting.dir=="h"? ($anchor.outerHeight()*2) : 0) : y

// x=(parentlioffset.left+x+$ul.data('dimensions').w > docrightedge)? x-$ul.data('dimensions').parentliw-$ul.data('dimensions').w : x //if not enough horizontal room to the ridge parent LI
// y=(parentlioffset.top+$ul.data('dimensions').h > docbottomedge)? y-$ul.data('dimensions').h+$ul.data('dimensions').parentlih : y

Check results: http://www.sunreef-yachts.com ( Yacht models menu at top)

Thanks again :)