Having first image in a cycle slideshow fadein?
I'm trying to have my first image of a jQuery cycle slideshow fade in at: Slide Show test
The code I'm using is:
$(document).ready(function() {
$('#slideshow img:开发者_如何学Pythonfirst').fadeIn(20000, function() {
$('#slideshow').cycle({
fx: 'fadeZoom',
timeout: 8000,
speed: 6000,
});
});
});
Unforunately it isn't working. What am I missing? What mistake have I made? Any help, guidance or code snippets would be greatly appreciated.
Thanks, PChuprina
You are fading in the image, but you should be fading in the div.
So change img
to div
.
have you tried the following?
$(document).ready(function() {
$('#slideshow img:first').fadeOut(0);
$('#slideshow img:first').fadeIn(20000, function() {
$('#slideshow').cycle({
fx: 'fadeZoom',
timeout: 8000,
speed: 6000,
});
});
});
精彩评论