Created
February 16, 2016 21:05
-
-
Save chadoh/c79c0e4e08388006c7f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <li id="1"> | |
| <div><img data-src="img1.png"/></div> | |
| <div><img src="img2.png"/></div> | |
| <li> | |
| <script> | |
| jQuery(function() { | |
| setInterval(function() { | |
| // select a random slot to work with. For that slot: | |
| // 1. Ensure that background image `src` attribute is set (load the image) | |
| // 2. Once image is loaded, fade out foreground div (opacity: 0) | |
| // 3. Move foreground div to background | |
| // 4. Change its opacity back to 1 for the next time it's switched | |
| }, 1000); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment