Note that there are some explanatory texts on larger screens.

plurals
  1. POMenu Item Hover JavaScript Part 2
    primarykey
    data
    text
    <p>Hey ya'll I had this issue before, got it fixed but now my problem is back...with a vengeance!!</p> <p>What I am trying to do is a navigation made up of list items and when you hover over one of the items another menu will appear and the user will be able to hover over those items and if the user hovers out of either menu list then the second menu displays:none</p> <p>Here is my JQuery Code</p> <pre><code>&lt;script&gt; $(".galleryNavToggle").on("mouseenter mouseleave", function(event){ var headNavGal = $("#headerNavGallery"); if(event.type === "mouseenter"){ headNavGal.show(); }else if(event.type ==="mouseleave" &amp;&amp; ((event.relatedTarget !== headNavGal[0] &amp;&amp; $.inArray(event.relatedTarget, headNavGal.find("*")) &lt;=0) || $.inArray(event.relatedTarget, $(".galleryNavInfoToggle")) &gt; 0)){ headNavGal.hide(); } }); $("#headerNavGallery").on("mouseleave", function(event){ var headNavGal = $(this); if(event.type ==="mouseleave"){ headNavGal.hide(); } }); &lt;/script&gt; </code></pre> <p>HTML:</p> <pre><code>&lt;div class="headerNav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="" class='galleryNavToggle'&gt;Gallery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="" class='galleryNavInfoToggle'&gt;Info&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!--headerNav--&gt; &lt;div class="headerNavGallery" id="headerNavGallery" style="display:none;"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Categoies&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Products&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!--headerNavGallery--&gt; &lt;div class="headerNavInfo" id="headerNavInfo" style="display:none;"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;William&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;CV&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Artist Bio&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Video&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!--headerNavInfo--&gt; </code></pre> <p>and my CSS:</p> <pre><code>.headerNav{ color:#FFF; padding-left:110px; padding-top: 18px; border:thin solid black; float:left; } .headerNav ul{ list-style-type:none; margin:0; padding:0 0 0 8px; } .headerNav li{ float:left; } .headerNav ul a{ font-size:24px; color:#FFF; display:block; padding:0 55px 0 0; text-decoration:none; text-transform:capitalize; } .headerNav ul a:hover{ color:#a40404; text-decoration:none; } .headerNavGallery{ color:#000; padding-top:30px; padding-left:250px; float:left; border:thin solid black; margin-left:-1px; } .headerNavGallery ul{ list-style-type:none; margin:0; padding:0 0 0 8px; } .headerNavGallery li{ float:left; } .headerNavGallery ul a{ font-size:24px; color:#000; display:block; padding:0 15px 0 0; text-decoration:none; text-transform:capitalize; } .headerNavGallery ul a:hover{ color:#a40404; text-decoration:none; } .headerNavInfo{ color:#000; padding-top:30px; padding-left:365px; } .headerNavInfo ul{ list-style-type:none; margin:0; padding:0 0 0 8px; } .headerNavInfo li{ float:left; } .headerNavInfo ul a{ font-size:24px; color:#000; display:block; padding:0 15px 0 0; text-decoration:none; text-transform:capitalize; } .headerNavInfo ul a:hover{ color:#a40404; text-decoration:none; } </code></pre> <p>If anyone can help that would be awesome...I believe the issue would be in JQuery...Im still checking it over right now :)</p> <p>Thanks for your help in advanced.</p> <ul> <li>J</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload