I’m trying tu use the jQuery Backgrounder Plugin as a slideshow but doesn’t quite work. I’d really appreciate any kind of help at all. Thanks. Here’s what I’ve got so far:
HTML:
<div id="my_background">
<img src="/img/main/home.jpg" />
<img src="/img/main/home-2.jpg" />
</div>
jQuery call:
$(function() {
setInterval( $('#my_background').backgrounder({element : '#content-bg'}) , 5000 );
});
jQuery plugin
Changed line
var img = $(this).children('img').first();
to
var img = $(this).children('img').next();
Once every 5 seconds it should switch the image but it doesn’t work. What am I doing wrong?
Something like this should do the trick, without having to modify the plugin-code:
http://jsfiddle.net/WZ3TL/
HTML
JS