Note that there are some explanatory texts on larger screens.

plurals
  1. POHave inner div elements fade in/out on a loop while user hovers
    primarykey
    data
    text
    <p>I've tried numerous examples elsewhere here on Stackoverflow but with no luck, basically I have a simple div with a number of child elements which I want to fade in and out on a loop while the user hovers the article element. You can see where I've got to thus far here:</p> <p><a href="http://jsfiddle.net/rWXu7/" rel="nofollow">http://jsfiddle.net/rWXu7/</a></p> <p>My HTML:</p> <pre><code>&lt;article class="product"&gt; &lt;div class="offers"&gt; &lt;div&gt;Offer 1&lt;/div&gt; &lt;div style="display: none;"&gt;Offer 2&lt;/div&gt; &lt;div style="display: none;"&gt;Offer 3&lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p>My JS:</p> <pre><code> var tickerID; $("article.product").hover(function(){ var list=$(this).find('div.offers &gt; div'); (function repeatTicker() { list.each(function(index) { $(this).fadeIn('slow').delay(2000).fadeOut('slow'); }); tickerID = setTimeout(repeatTicker, 2000); } ()); }, // Rollout function(){ clearTimeout(tickerID); }); </code></pre> <p>My CSS:</p> <pre><code>article { background-color: red; padding: 20px; } </code></pre> <p>As you can see at present the each loop initiates the fadeIn, Delay and fadeOut on all the elements at once whereas I want to 'cycle' through each element one at a time.</p> <p>I get why this doesn't work as it is but I'm having a blond moment in working out how to best solve the problem.</p> <p>I want to avoid using something like 'innerfade' as it seems overkill for a single fade in/out loop.</p> <p>Any thoughts greatly appreciated. :)</p>
    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.
    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