Note that there are some explanatory texts on larger screens.

plurals
  1. POVertical animation on menu
    text
    copied!<p>I'm making a dropdown menu and it's working perfectly with the slideUp/slideDown functions from the jquery api. However - if i want a vertical animation instead i can't find any functions in the api to do that. Can anyone enlighten me :)? Is it possible?</p> <p>Html</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;a href=""&gt;Hvem&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Hvad&lt;/a&gt; &lt;ul&gt; &lt;li class="first-item"&gt;&lt;a href=""&gt;Produkter&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Leveringer&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Hvordan&lt;/a&gt; &lt;ul&gt; &lt;li class="first-item"&gt;&lt;a href=""&gt;Reklame&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;PR&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Websites&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Illustrationer&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="last-item"&gt;&lt;a href=""&gt;S??dan!&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Jquery</p> <pre><code>&lt;!-- Menu animation --&gt; &lt;script type="text/javascript" src="http://www.hieu.co.uk/blog/wp-content/plugins/download-monitor/download.php?id=Groject.ImageSwitch.yui.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#menu &gt; ul &gt; li:not(.inpath) ul').hide(); $('#menu .inpath ul').show(); $('#menu &gt; ul &gt; li:not(.inpath)').hover( function() { $('ul', this).slideDown(300); $('#menu li.inpath ul').slideUp(300); }, function() { $('ul', this).slideUp(300); $('#menu li.inpath ul').slideDown(300); }); }); &lt;/script&gt; </code></pre>
 

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