Dropdown submenu direction will be changed if submenu would go out the edges of wrapper container. The Wrapper ID is a property of desire html tag, e.g. for the following tag &lt;div id=''<b>content</b>''&gt; the Wrapper ID is <b>content</b>. Default wrapper is container with .dj-megamenu class