Can this code be made to automatically switch images?
Here is the loader code:
jQuery('#loader').hide();
// DOM ready
jQuery(function () {
//alert('test');
jQuery('#showcase li a').click( function(){
jQuery('#loader').show();
jQuery('#featured').load(function () {
jQuery('#loader').hide();
return;
}).error(function () {
alert("Failed to load image");
}).attr('src', this.href);
var linkout = jQuery(this).attr('rel');
//alert(linkout);
jQuery('#featured-link').attr('href',linkout);
jQuery('#showcase li a').removeClass('active');
jQuery(this).addClass('active');
return false;
});
});
I've got this image loader on the homepage for this client where you click the thumbnails and it loads the image via this little loader. I want it to flip through the images on an interval whether they are clicked or not.
I believe this is the code that calls on this function in the header.php (this is on a wordpress theme I did not design. I just have to make it flip these dang images without clicking):
<div id="loader"></div>
<div id="featuredImg">
<p>
<a id="featured-link" href="<?php if ( get_option('woo_featured_1_linkout') <> '' ) { echo get_option('woo_featured_1_linkout').''; } else {echo '#'; } ?>" title="<?php bloginfo('name'); ?>">
<img id="featured" src="<?php if ( get_option('woo_featured_1') <> '' ) { echo get_option('woo_featured_1').''; } else { bloginfo('template_directory'); ?>/images/img-featured-01.png<?php } ?>" alt="<?php bloginfo('name'); ?>" /></a>
</p>
</div>
I'll buy someone a freaking pizza if they can help me with this. I been trying on my own for a while but I submit. Can anyone maybe just point me at the right section of the right doc to educate me to do this myself if they don't have time to explain it to me or show me how to make it do this? Thanks in advance. I'll be reading the forum in the meantime trying to work it out on my own....woo themes... sighhhh..
-k1down