I am using the Cycle plugin for JQuery to create a banner rotator with the pauseOnHover functionality. I have it working properly and even have the pageAnchorBuilder working correctly so that it displays an image vs '1,2,3, etc. The problem is it can't find the images because I am not using images as the selector but divs.
How can I change the following code to let me specify which unique image to display for each slide (div)? When I place the image url (../images/tab.png) in the img src tag it displays a broken link. Even if that was to work it would not accomplish what I am trying to do, display a unique image per div.
I am trying to create a javascript version of something like this: http://www.bazaarvoice.com
Here is my code:
banner.js
$(document).ready(function() {
$('.slideshow').cycle({
speed: 200,
timeout: 15000,
pager: '#tabs',
pagerEvent: 'mouseover',
pauseOnPagerHover: true,
pagerAnchorBuilder: function(i, slide){// callback fn for building anchor links: function(index, DOMelement)
return '<a href="path-to-link"><img src="' + slide.src + '" height="47" width="189" /></a>';
}
});
});