Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've added a wrapper to the viewer and removed the extra spacing between your outer images and the slideshow viewer using the html comment tags (this is better than setting font-size:0). I've adjusted the JS, so that the transition works. I've also cleaned up and reduced the amount of CSS needed.</p> <p><strong>HTML</strong></p> <pre><code>&lt;div class="picture-container"&gt; &lt;img src="http://www.image-and-text.com/pictures/whiskey_with_ice.jpg" /&gt;&lt;!-- --&gt;&lt;div class="viewer"&gt; &lt;img src="http://images.printsplace.co.uk/Content/Images/Products/46576/43569/Image_of_M101_1.jpg" class="active" /&gt; &lt;img src="http://i.bosity.com/clothes_cache/261/12002348/3480000011312473207_12002348_1_image.jpg" /&gt; &lt;img src="http://lokeshdhakar.com/projects/lightbox2/images/examples/image-6.jpg" /&gt; &lt;/div&gt;&lt;!-- --&gt;&lt;img src="http://www.image-and-text.com/pictures/whiskey_with_ice.jpg" /&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>* {margin:0;padding:0} .picture-container &gt; img {display:inline-block;width:25%;} .viewer {display:inline-block;position:relative;width:50%;vertical-align:top;} .viewer img {position:absolute;width:100%;} </code></pre> <p><strong>JS</strong></p> <pre><code>function slideSwitch() { var transitionDuration = 1000; var active = $('.viewer img.active'); var next = $('.viewer img:first').insertAfter(active); active.removeClass('active').fadeOut(transitionDuration); next.addClass('active').hide().fadeIn(transitionDuration); } $(document).ready(function(){ $('.viewer img.active').insertAfter('.viewer img:last'); setInterval("slideSwitch()", 4000); }); </code></pre> <p>You can see it here: <a href="http://jsfiddle.net/Ry7Su/1/" rel="nofollow">http://jsfiddle.net/Ry7Su/1/</a></p> <p>Hope this helps.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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