Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make an automatic slideshow in javascript
    primarykey
    data
    text
    <p>Im trying to make an automatic slideshow with these images, whenever I try this, it gets stuck on first image. <a href="http://jsfiddle.net/He9AV/5/" rel="nofollow">http://jsfiddle.net/He9AV/5/</a> </p> <p>HTML:</p> <pre><code>&lt;div id="slideshow"&gt; &lt;a href="../images/food/e_chicken_quesa.jpg" target="_blank"&gt;&lt;img class="show" src="../images/food/chicken_quesa.jpg" alt="Chicken Quesadilla" title="Chicken Quesadilla"&gt;&lt;/a&gt; &lt;a href="../images/food/e_steak.jpg" target="_blank"&gt;&lt;img src="../images/food/steak.jpg" alt="Beef Tenderloin" title="Beef Tenderloin"&gt;&lt;/a&gt; &lt;a href="../images/food/e_pasta_display.jpg" target="_blank"&gt;&lt;img src="../images/food/pasta_display.jpg" alt="Pasta Station" title="Pasta Station"&gt;&lt;/a&gt; &lt;a href="../images/food/e_salmon.jpg" target="_blank"&gt;&lt;img src="../images/food/salmon.jpg" alt="Salmon Filet" title="Salmon Filet"&gt;&lt;/a&gt; &lt;a href="../images/food/e_panacotta.jpg" target="_blank"&gt;&lt;img src="../images/food/panacotta.jpg" alt="Panacotta" title="Panacotta"&gt;&lt;/a&gt; &lt;a href="../images/food/e_beet_salad.jpg" target="_blank"&gt;&lt;img src="../images/food/beet_salad.jpg" alt="Beet Salad" title="Beet Salad"&gt;&lt;/a&gt; &lt;a href="../images/food/e_tuna.jpg" target="_blank"&gt;&lt;img src="../images/food/tuna.jpg" alt="Seared Tuna" title="Seared Tuna"&gt;&lt;/a&gt; &lt;a href="../images/food/e_foi_gras.jpg" target="_blank"&gt;&lt;img src="../images/food/foi_gras.jpg" alt="Foi Gras" title="Foi Gras"&gt;&lt;/a&gt; &lt;/div&gt; </code></pre> <p>Im not sure where the error is occuring, but here it is<br /> Javascript:</p> <pre><code>&lt;script type="text/javascript"&gt; var hovering = false; var slideshow = $("#slideshow"); slideshow.mouseenter(function() { hovering = true; }).mouseleave(function() { hovering = false; slideShow(); }); function slideShow() { if (!hovering) { var currentImg = (slideshow.children("img:visible").length) ? slideshow.children("img:visible") : slideshow.children("img:first"); var nextImg = (currentImg.next().length) ? currentImg.next() : slideshow.children("img:first"); currentImg.delay(1000).fadeOut(500, function() { nextImg.fadeIn(500, function() { setTimeout(slideShow, 1000); }); }); } } $(document).ready(function() { slideShow(); }); &lt;/script&gt; </code></pre>
    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.
 

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