Mega Dropdown menu seen on sitepoint: How do I show the menu on mouse click
Is there a way to display the dr开发者_C百科opdown menu shown on sitepoint by mouse click. http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/
Currently, it shows the menu only on mouse hover.
You can add to this:
$("li.mega").hoverIntent(megaConfig); 
And make it this:
$("li.mega").hoverIntent(megaConfig).click(addMega);
Depending on how you want it to behave (you can test, see which seems more natural), you may want this instead:
$("li.mega").hoverIntent(megaConfig).click(function() {
  $(this).toggleClass("hovering");
});
If you only want it shown on mouse click, remove the .hoverIntent(megaConfig) part from that last example, leaving only the .click() part.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论