im working on some project, and i'm trying to turn on the gallery slideshow after "x" msec,
but when i'm adding the class, the cycle plugin just not working, the code:
jQuery:
$('.gallery-slideshow').cycle({
fx: 'fade',
speed: 'fast',
timeout: 1000,
random: 1
});
setInterval (function (){ $('#girl').addClass('gallery-slideshow'); }, 600);
i also tried to add an attribute of class:
$('.gallery-slideshow').cycle({ fx: 'fade', speed: 'fast', timeout: 1000, random: 1 });
setInterval (function (){ $('#girl').attr('class', 'gallery-slideshow'); }, 600);
but its not working.
html:
<div class="gallery"> <div id="girl"> <img src="../Images/gallery-imgs/1.jpg" alt="" /> <img src="../Images/gallery-imgs/2.jpg" alt="" /> <img src="../Images/gallery-imgs/3.jpg" alt="" /> <img src="../Images/gallery-imgs/4.jpg" alt="" /> </div> </div>
i appreciate your help, thanks