Note that there are some explanatory texts on larger screens.

plurals
  1. PODrop down menu flickering except in firefox
    primarykey
    data
    text
    <p>I'm having a problem similar to this one <a href="https://stackoverflow.com/questions/1430183/drop-down-box-keeps-flickering-jquery-and-css">Drop Down Box Keeps flickering - JQuery and CSS</a> with a drop down menu flickering when I move the mouse over it, except that it doesn't seem to happen in firefox. I put an alert in the mouseout event I have on it and found out that every time I moved from one <code>&lt;li&gt;</code> to another inside the menu the alert was triggered. Here is the important parts of the html code behind it.</p> <pre><code>&lt;!--// HEADER BAR //--&gt; &lt;div id="header"&gt; &lt;!--// NAVIGATION LINKS //--&gt; &lt;div id="navigation"&gt; &lt;!--// AUTHENTICATED //--&gt; &lt;div id="options" class="authenticated"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="javascript: toggleAccount()" class="account" title="Account"&gt;/&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;!--// ACCOUNT MENU //--&gt; &lt;div id="account_container" style="display: none;" onmouseout="hideAccount();"&gt; &lt;div id="account"&gt; &lt;ul&gt; &lt;li&gt;Options...&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>As you can see, the "account_container" div is the drop down menu. It first appears when the user clicks on the account li under authenticated and disappears either when the user clicks on the li again or mouses out. The navigation div has it's height set to 40px in the css, so I thought it might be a positioning problem like in the linked question, but setting the height to auto didn't fix it, and I can't take the account container out of the navigation bar because that will mess up it's positioning. Why is the browser detecting the shift from one menu item to another as a mouseout event and how can I prevent it?</p> <p><img src="https://i.stack.imgur.com/MI70K.jpg" alt="The menu in question"></p> <p>EDIT:</p> <p>Could I do something like Andy E's answer to <a href="https://stackoverflow.com/questions/8850673/drop-down-menu-onmouseout-getting-invoked-on-the-child-node-when-set-in-the-p">this question</a>? Could I change <code>onmouseout="hideAccount()"</code> to <code>onmouseout="hideAccount.call(this)"</code> and detect if the mouse is over a child element of the dropdown inside the hideAccount function? If so, how would I go about that? For reference, here's the hideAccount function:</p> <pre><code>function hideAccount(){ //alert("mouse out!"); $(".account_container").hide(); } </code></pre>
    singulars
    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.
 

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