<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Support Forum - Topic: Mega menu on click, rather than hover</title>
		<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover</link>
		<description>Support Forum - Topic: Mega menu on click, rather than hover</description>
		<language>en-US</language>
		<pubDate>Sat, 18 May 2013 23:07:36 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/mega-menu-on-click-rather-than-hover" rel="self" type="application/rss+xml" />

		<item>
			<title>Nick on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72180</link>
			<pubDate>Tue, 21 Aug 2012 21:37:47 +0000</pubDate>
			<dc:creator>Nick</dc:creator>
			<guid isPermaLink="false">72180@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Unfortunately t's not as simple as changing hover to click, since hover is still needed as well in the click menu to determine when to close the child menu.&#60;/p&#62;
&#60;p&#62;Here is a link (&#60;a href=&#34;http://stackoverflow.com/questions/7312414/superfish-jquery-menu-open-on-click-rather-than-hover&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/7312414/superfish-jquery-menu-open-on-click-rather-than-hover&#60;/a&#62;) of the process of changing a (not this one) mega menu from hover to click. You can compare the code to see that the end result is fairly different and looks very labor intensive.&#60;/p&#62;
&#60;p&#62;Of course you can always pay a few dollars to buy a ready made menu which does what you want in 20 different ways. Here is two cool ones for $15 and $4 that have clicks, sliders and rattles, and there are many more: (&#60;a href=&#34;http://codecanyon.net/item/ubermenu-wordpress-mega-menu-plugin/154703&#34; rel=&#34;nofollow&#34;&#62;http://codecanyon.net/item/ubermenu-wordpress-mega-menu-plugin/154703&#60;/a&#62;) (&#60;a href=&#34;http://codecanyon.net/item/mega-menu-complete-set/152825&#34; rel=&#34;nofollow&#34;&#62;http://codecanyon.net/item/mega-menu-complete-set/152825&#60;/a&#62;) &#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Nick
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deaner666 on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72178</link>
			<pubDate>Tue, 21 Aug 2012 21:26:53 +0000</pubDate>
			<dc:creator>Deaner666</dc:creator>
			<guid isPermaLink="false">72178@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;OK, I want the moon on a stick now ;-)&#60;/p&#62;
&#60;p&#62;For tablet / smartphone users, I need to be able to click outside the mega menus / dropdowns when they're open to make them go away ('cos there's no mouseleave event). Any ideas?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deaner666 on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72175</link>
			<pubDate>Tue, 21 Aug 2012 21:14:11 +0000</pubDate>
			<dc:creator>Deaner666</dc:creator>
			<guid isPermaLink="false">72175@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Further tweak... I changed &#34;options.delay&#34; to &#34;0&#34; for the mouseup event on mega menus. It felt odd to have a slight delay after clicking the link before the mega menu faded into place. You can see the final product here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.amanotech.dreamhosters.com&#34; rel=&#34;nofollow&#34;&#62;http://www.amanotech.dreamhosters.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;(It's heavily customised, but it is Abundance, honest!)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deaner666 on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72171</link>
			<pubDate>Tue, 21 Aug 2012 21:08:00 +0000</pubDate>
			<dc:creator>Deaner666</dc:creator>
			<guid isPermaLink="false">72171@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Cool. I think I solved it. I did this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//bind event for mega menu
megaItems.each(function(i){

	$(this).mouseup(

		function()
		{
			delayCheck[i] = true;
			setTimeout(function(){megaDivShow(i); },options.delay);
		}
	);

	$(this).mouseleave(
		function()
		{
			delayCheck[i] = false;
			setTimeout(function(){megaDivHide(i); },options.delay);
		}
	);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Seems to work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deaner666 on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72169</link>
			<pubDate>Tue, 21 Aug 2012 20:54:12 +0000</pubDate>
			<dc:creator>Deaner666</dc:creator>
			<guid isPermaLink="false">72169@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Right. I've made some progress. The file to change is:&#60;/p&#62;
&#60;p&#62;/abundance/js/avia.js&#60;/p&#62;
&#60;p&#62;Dropdowns work great, I made a small change to the dropdown function starting at line 282:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// bind events for dropdown menu
dropdownItems.find(&#38;#39;li&#38;#39;).andSelf().each(function()
{
	var currentItem = $(this),
		sublist = currentItem.find(&#38;#39;ul:first&#38;#39;),
		showList = false;

	if(sublist.length)
	{
		sublist.css({display:&#38;#39;block&#38;#39;, opacity:0, visibility:&#38;#39;hidden&#38;#39;});
		var currentLink = currentItem.find(&#38;#39;&#38;gt;a&#38;#39;);

		currentLink.bind(&#38;#39;mouseup&#38;#39;, function() //currentLink.bind(&#38;#39;mouseenter&#38;#39;, function() &#38;lt;--CHANGED BY DAVE
		{
			sublist.stop().css({visibility:&#38;#39;visible&#38;#39;}).animate({opacity:1});
		});

		currentItem.bind(&#38;#39;mouseleave&#38;#39;, function()
		{
			sublist.stop().animate({opacity:0}, function()
			{
				sublist.css({visibility:&#38;#39;hidden&#38;#39;});
			});
		});

	}

});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So you click a nav link to get the dropdown menu and it automatically closes when you move the mouse away from it.&#60;/p&#62;
&#60;p&#62;The mega menus I haven't sorted completely yet. I've changed the function starting on line 262 to the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//bind event for mega menu
megaItems.each(function(i){

	$(this).toggle( //$(this).hover( &#38;lt;--CHANGED BY DAVE

		function()
		{
			delayCheck[i] = true;
			setTimeout(function(){megaDivShow(i); },options.delay);
		},

		function()
		{
			delayCheck[i] = false;
			setTimeout(function(){megaDivHide(i); },options.delay);
		}
	);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Trouble is, using toggle, you have to click the nav link again to get rid of the menu, rather than it disappearing automatically. My jQuery skills aren't strong enough to quickly see how to rewrite this function to work the same as dropdowns. Any ideas?&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Dave
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Mya on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72163</link>
			<pubDate>Tue, 21 Aug 2012 20:39:14 +0000</pubDate>
			<dc:creator>Mya</dc:creator>
			<guid isPermaLink="false">72163@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi Dave,&#60;/p&#62;
&#60;p&#62;I'm not sure either so let me tag the rest of the team to see if they know.&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Mya
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deaner666 on "Mega menu on click, rather than hover"</title>
			<link>http://www.kriesi.at/support/topic/mega-menu-on-click-rather-than-hover#post-72159</link>
			<pubDate>Tue, 21 Aug 2012 20:25:58 +0000</pubDate>
			<dc:creator>Deaner666</dc:creator>
			<guid isPermaLink="false">72159@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi there, just wondering if anyone can help with this query?&#60;/p&#62;
&#60;p&#62;I want the dropdown menus / mega menus to open when a nav link is clicked, rather than on hover. Can someone point to where in the JS I need to do this? I've scanned through /abundance/framework/js/avia_mega_menu.js but can't see the event handler for this.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Dave
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
