Note that there are some explanatory texts on larger screens.

plurals
  1. POFade Between Images
    primarykey
    data
    text
    <p>I have some code set up to fade between images, and it's not working properly:</p> <p>The images: </p> <pre><code> &lt;div id="banner_area"&gt; &lt;img class="active" src= "http://f14.co/automaker-search/assets/images/laptop-Dodge.png"&gt; &lt;img src= "http://f14.co/automaker-search/assets/images/laptop-Ford.png"&gt; &lt;img src= "http://f14.co/automaker-search/assets/images/laptop-Honda.png"&gt; &lt;img src= "http://f14.co/automaker-search/assets/images/laptop-Subaru.png"&gt; &lt;/div&gt; </code></pre> <p>The javascript:</p> <pre><code>&lt;script&gt; function cycleImages(){ var $active = $('#banner_area .active'); var $next = ($('#banner_area .active').next().length &gt; 0) ? $('#banner_area .active').next() : $('#banner_area img:first'); $next.css('z-index',2);//move the next image up the pile $active.fadeOut(1500,function(){ //fade out the top image $active.css('z-index',1).show().removeClass('active'); //reset the z-index and unhide the image $next.css('z-index',3).addClass('active');//make the next image the top one }); } $(window).load(function(){ $('#banner_area').fadeIn(1500);//fade the background back in once all the images are loaded // run every 7s setInterval('cycleImages()', 7000); })&lt;/script&gt; </code></pre> <p>The CSS:</p> <pre><code>#banner_area img { width:714px; height:414px; position:absolute; top:28px; left:55px;top:0;z-index:1} #banner_area img.active{z-index:3} </code></pre> <p>Yet all I get is a pile of images, like so: <a href="http://f14.co/automaker-search/reno/" rel="nofollow">http://f14.co/automaker-search/reno/</a></p> <p>I'm guessing I'm way off? I'm really trying to keep it simple. No hover, just an auto rotate.</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