Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mega menu hover help

Featured Replies

Hi wondered if someone could help me, i have a Mega Menu i am building and on the menu i want to have it so when hover over the menu it stays open until you click outside of that div but everytime i move over it, it closes.

 

The website url is: http://www.bluegeeks.co.uk/restaurant/index.html

 

the one i want it on is the item name: "Menu"

 

And the Jquery Code i have done for thi at the moment is:

 

<script type="text/javascript">
$(document).ready(function() {
$(".drop").hover(function() {
	$(".dropdown_3columns").show();
});

$(".drop").click(function() {
	$(".dropdown_3columns").hide();
});
});
</script>

 

Kind Regards,

Aaron

Hi Aaron,

 

I'm no expert in jQuery (hence my other questions about jQuery on the forum!), but for this particular dropdown, you might be better off modifying the CSS class instead. This way, you could do something like this:

 

 

<script type="text/javascript">
$(document).ready(function() {
       $(".drop").hover(function() {
               $(".dropdown_3columns").css("left", "-1px");
       });

       $(".drop").click(function() {
               $(".dropdown_3columns").css("left", "-999px");
       });
});
</script>

 

I think that might work, as you would be changing the CSS property, and not changing it back until it is clicked - but don't point a gun to my head if it doesn't work!!! :shok:

 

EDIT: Also, I might be tempted to put a "close" button on your popup div, as it isn't always obvious for users that you can click outside to close - remember - assume all users are stupid!! Really must get some sleep now! :lazy:

Edited by wickywills

  • Author

Thanks for reply mate, I fixed the click event I am now going to see if can do the close button and see what looks like

 

Kind regards,

Aaron

 

Sent from ipod touch

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.