slider.js 736 B

123456789101112131415161718192021222324252627282930313233
  1. function preload_images(images) {
  2. for (var i = 0; i< images.length; i++) {
  3. $('<img />').attr('src',images[i]);
  4. console.log(images[i]);
  5. }
  6. console.log('finish...');
  7. }
  8. $(window).resize(function() {
  9. $('#slideshow').height($('#banner').height());
  10. });
  11. $(document).ready(function() {
  12. //$('#banner_overlay').show();
  13. });
  14. $(window).load(function() {
  15. var images = [];
  16. $('#banner > li').each(function() {
  17. images.push($(this).children('a').children('img').attr('src'));
  18. //console.log($(this).children('a').children('img').attr('src'));
  19. });
  20. //preload_images(images);
  21. $('#slideshow').height($('#banner').height());
  22. //$('#banner_overlay').hide();
  23. });