Created
October 25, 2009 17:29
-
-
Save kathgironpe/218142 to your computer and use it in GitHub Desktop.
jQuery Cycle - Display Loading Message if Images Are not Loaded
This file contains 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
$(document).ready(function($) { | |
$('#gallery-slideshow, .gallery-controls').hide(); | |
$('#loading').show(); | |
var last_slide = $('#gallery-slideshow li img:last'); | |
var last_image_attr = last_slide.attr("src"); | |
last_slide.onImagesLoad({ | |
itemCallback: itemImagesLoaded | |
}); | |
function itemImagesLoaded(){ | |
$('#gallery-slideshow, .gallery-controls').show(); | |
$('#loading').hide(); | |
$('#gallery-slideshow').cycle({ | |
fx: 'fade', | |
speed: 'fast' | |
}); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment