Skip to content

Instantly share code, notes, and snippets.

@dalethedeveloper
Created October 1, 2014 15:17
Show Gist options
  • Save dalethedeveloper/0ce24d86cf4c4a12e277 to your computer and use it in GitHub Desktop.
Save dalethedeveloper/0ce24d86cf4c4a12e277 to your computer and use it in GitHub Desktop.

Revisions

  1. dalethedeveloper renamed this gist Oct 1, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. dalethedeveloper created this gist Oct 1, 2014.
    48 changes: 48 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
    <script>
    var rollem = function() {
    var si = $('#slide ul.current');
    si.removeClass('current').fadeOut(
    {
    duration: 800,
    always: function(){
    if( si.next().length )
    si.next('ul').addClass('current').fadeToggle(1500);
    else
    $('#slide ul:first').addClass('current').fadeToggle(1500);
    window.setTimeout(rollem,10000);
    }
    }
    );
    };
    $('#slide ul').hide();
    $('#slide ul:first').addClass('current').show();
    rollem();
    </script>
    </head>
    <body>
    <div id="slide">
    <ul>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    </ul>
    <ul>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    </ul>
    <ul>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    <li><img src="http://placehold.it/200x200" /></li>
    </ul>
    </div>

    </body>
    </html>