Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Erfan ... if you want a SLIDE gallery than : <a href="http://jsfiddle.net/roXon/MSNJh/" rel="nofollow">SLIDE GALLERY</a></p> <p>If you want what you want ( ;D ) than try:</p> <p><strong>EDIT</strong> Due to errors caused by a well known jQuery ticket I came up with this demo:</p> <h2><a href="http://jsfiddle.net/roXon/CyQcH/1/" rel="nofollow">SIMPLE FADE GALLERY</a></h2> <pre><code>var el = $('.myDivgallery img'); var z = 1; $(el[0]).show(); function loop(ev) { el.siblings().delay(1000).fadeOut(300).eq(z).fadeIn(500, function() { check = z != el.length-1 ? z++ : z=0; loop(); }); } loop(); </code></pre> <p>(Thanks to the community for not cooking me a <em>maccaroni pasta al pesto</em> for my previous demo :D )<br> (And don't ask me why I called a var "<code>z</code>" that actually do some <code>c</code>ounts)</p> <p><hr> <strong>The old version created animations buildups on page/tab absence</strong> <br>(I leave it here just for 'bad practice / example' .)</p> <h2><a href="http://jsfiddle.net/roXon/CyQcH/" rel="nofollow">ERRATA fade gallery</a></h2> <pre><code>$('.myDivgallery img:eq(0)').show(); // show first image on page load var imgC = 0; // set counter to '0' function fade() { // introduce our function var img = $('.myDivgallery img'); var imgL = img.length; // get the number of images timeout = setTimeout(function() { imgC++; // count +1 img.eq(imgC-1).fadeIn().siblings('img').fadeOut(); if ( imgC &gt;= imgL){ // if counter goes over our number of images... imgC = 0; // reset the counter to '0' } fade(); // run our function in a loop }, 2000); // timeout delay } fade(); // start our function </code></pre> <p><strong>read again... B. A. D. ...! bad bad bad</strong></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.
    3. 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