Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery, hide <li> and <ul> of menu, show only on hover
    primarykey
    data
    text
    <p>Example: <a href="http://jsfiddle.net/sUm2W/" rel="nofollow">http://jsfiddle.net/sUm2W/</a></p> <p>This one is a little hard to explain so I've included all the code I am using.</p> <p>When the page loads the li elements show until I hover over them, at which point they disappear and the menu works exactly as I want it to. What is making them visible? I have tried setting the li width to 0px but this doesn't work either.</p> <p>Also, why is there a 40px border at the left hand side of the UL? I haven't made any borders yet in order for the text to show to the extreme left I need to set the li margin to -40px.</p> <p>Anyway, here is the code...</p> <pre><code>&lt;style type="text/css"&gt; body { background-color: #000; margin:0; text-align:center; min-width:1080px; max-width:1200px; margin-left:auto; margin-right:auto; font:Arial, Helvetica, sans-serif; color:#FFF; } ul#navigation { position: fixed; z-index:9999; background-color:#999; margin:0; width:0px; } ul#navigation li { text-align:left; list-style:none; } &lt;/style&gt; &lt;script type="text/javascript" src="jquery-1.3.2.js"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $("ul#navigation").hover(function(){ $('ul#navigation').stop().animate({'width':'150px'},200); }, function () { $('ul#navigation').stop().animate({'width':'0px'},200); } ); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;ul id="navigation"&gt; &lt;li&gt;Home&lt;/li&gt; &lt;li&gt;About&lt;/li&gt; &lt;li&gt;Pics&lt;/li&gt; &lt;li&gt;Stuff&lt;/li&gt; &lt;/ul&gt; &lt;/body&gt; </code></pre> <p>Thanks :)</p>
    singulars
    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.
 

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