Javascript images animation


SUBMITTED BY: Guest

DATE: Nov. 30, 2013, 5:34 a.m.

FORMAT: Text only

SIZE: 399 Bytes

HITS: 936

  1. <div id="exampleid">
  2. <img class="img" src="image/myimage1.png">
  3. <img class="img" src="image/myimage1.png">
  4. </div>
  5. <script>
  6. $(document).ready(function()
  7. {
  8. $('.img:gt(0)').hide();
  9. setInterval(function() {
  10. $(".img:first-child").fadeOut(0).next(".img").fadeIn(0).end().appendTo("#exampleid")
  11. }, 800);
  12. });
  13. </script>

comments powered by Disqus