I am currently facing a challenge with my menu setup. It consists of an unordered list with nested lists that are initially hidden and only shown on hover.
Since the menu is dynamic, I encounter the issue of not knowing in advance if a dropdown will appear near the edge of the window, causing it to overflow and display a scrollbar. I am looking for a solution where I can add a specific class when this situation occurs.
Any assistance on this matter would be greatly appreciated.
Edit: I have created a quick example to demonstrate this problem here: jsfiddle.net/TP8v9