Expand MegaMenu right to left

Permalink Browser Info Environment
I have my site navigation in the top right corner. When the MegaMenu is activated it expands from left to right and goes past my site's container causing several display issues. I'm trying to change it so it expands from right to left instead.

I've managed to scoot the MegaMenu drop down over with CSS but naturally its not quite ideal. As you can see the drop down doesn't look like it stems from the nav button. http://www.screencast.com/t/bwX5UYh7....

Is there a better solution to this?

Type: Discussion
Status: New
nosfan1019
View Replies:
jb1 replied on at Permalink Reply
jb1
Unfortunately there's no edge detection in the Mega Menu, but larger menus are automatically indented back to the left so they don't go too far off the page (if they're very, very large). This tends to be the best overall output. But if you want to change how that's done, just look for lines 143-147 in jquery.dcmegamenu.1.3.2.js.
You can tinker with the "2" number which halves the left margin and handles the centring of it.

I haven't tried tweaking it myself, but that would be a good place to start.

Hope this helps.

JB
nosfan1019 replied on at Permalink Reply
nosfan1019
Thanks for the response. Great add-on too.

I had to brush up on my Jquery but I figured out what I needed. Just replacing this ...

//                      If Left Position Is Negative Set To Left Margin                     
                     if(subLeft > 0){
                           $('.sub-container',this).css('left','0');
                     }else if(marginRight < marginLeft){
                        $('.sub-container',this).css('right','0');
                     }else {
                        $('.sub-container',this).css('left',parentLeft+'px').css('margin-left',-marginLeft+'px');
                     }


With this ...

$('.sub-container',this).css('right','0');


Was exactly what I was looking for
jb1 replied on at Permalink Reply
jb1
Glad that you were able to get that working.

Thanks for leaving a positive review I really appreciate that :)

maybe you might want to checkout other add-ons at c5extras.com.

Have a great day

JB

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.