views:

354

answers:

1

Hi,

I'm trying to create a slideshow with the jquery cycle plugin. I'm trying to have it so that thumbs for the slide show are auto generated from the main images. I am also trying to have the ability to show both images that link out to other sections, and some that do not. So far, the thumbs break when I add a link to a main image. here is my code:

<script type="text/javascript">

$(function() {


$('#ss').after('<ul id="nav">').cycle({ 
    fx:     'fade', 
    speed:  '2000', 
    pager:  '#nav', 
 pause:         1,   

    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
        return '<li><a href="#"><img src="' + slide.a + '" width="50" height="50" /></a></li>'; 
    } 
});
});
</script>

</head>
<body>
<div id="ss" > 
<a href="#"><img src="img1.jpg" /></a> 
<a href="#"><img src="img2.jpg" /></a> 
<a href="#"><img src="img3.jpg" /></a> 
<a href="#"><img src="img4.jpg" /></a>
</div>
</body>
</html>
A: 

I think you are looking for something like this? cycle with anchors. Also look into the "slideExpr"

Ben