Note that there are some explanatory texts on larger screens.

plurals
  1. POadding slidedown event on a jquery menu
    text
    copied!<p>Ok I have this code:</p> <pre><code>&lt;html&gt; &lt;head&gt; var timeout = 0; var closetimer = 0; var ddmenuitem = 0; function jsddm_open() { jsddm_canceltimer(); jsddm_close(); ddmenuitem = $(this).find('#as').eq(0).css('visibility', 'visible'); bb = $(this).css("background","#0099FF"); } function jsddm_close() { if(ddmenuitem) ddmenuitem.css('visibility', 'hidden'); } function jsddm_timer() { closetimer = window.setTimeout(jsddm_close, timeout); bb = $(this).css("background","none"); } function jsddm_canceltimer() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null;}} $(document).ready(function() { $("#sinputbox").watermark("Search item here..."); $('#menu &gt; li').bind('mouseover', jsddm_open); $('#menu &gt; li').bind('mouseout', jsddm_timer);}); document.onclick = jsddm_close; &lt;/head&gt; &lt;body&gt; &lt;div id="hmenu"&gt; &lt;ul id="menu"&gt; &lt;li&gt;&lt;a class="active" href="index.php"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="gallery.php?name=gallery"&gt;Gallery&lt;/a&gt; &lt;ul id="as"&gt; &lt;li&gt;&lt;a href="gallery.php?name=clothing"&gt;Clothing&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="gallery.php?name=furniture"&gt;Furniture&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="gallery.php?name=householditems"&gt;Household-items&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="gallery.php?name=automotive"&gt;Automotive&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="gallery.php?name=food"&gt;Food&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="about.php"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="contact.php"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Now, I am planning to add a slidedown to that dropdown menu but I don't know how. I tried to add this line: "<code>$('this').slideDown('slow');</code>" inside this function: "<code>function jsddm_timer()</code>" but nothing work so far. Could someone here help me to this pls? I'm open in any suggestion thanks.</p>
 

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