Reputation: 6264
i have following code
<div class="caption" style=" position:absolute; margin-top:0px">
<img src="caption/img1.png" />
</div>
<script>
$(document).ready(function(){
setTimeout(function() {
$('div.caption').fadeOut('slow');
$('div.caption').fadeIn();
}, 1000);
});
but this work only once, what i want to do is after every 1000ms function should run and change image in div "caption" i have image series and i can put their names in array.
Upvotes: 0
Views: 961
Reputation: 41833
setInterval
takes the same arguments as setTimeout
but it executes the function every n milliseconds, as specified. see more here
Upvotes: 0