It depends. Do you want your images to appear in place of the text links or along with them?
Here is the typical generated code for a link:
HTML Code:
<a class="" href="#" onclick="ContentSlider.turnpage('slider2', 1); return false">2</a>
It switches to the second content in the slider with the id slider2. If you were to just put something like that on your page somewhere with an image:
HTML Code:
<a href="#" onclick="ContentSlider.turnpage('slider2', 1); return false"><img src="thumb_2.gif" border="0"></a>
It would probably work to load up the 2nd content but, unless the generated text links were also present, there would probably be an error. Their visibility could be set to hidden in a stylesheet though (for slider with id slider2):
Code:
#paginate-slider2 {
visibility:hidden;
}
If you wanted to hack the script to put in images in place of the text, here is where and how that might be done, the red lines generate text links:
Code:
ContentSlider.buildpagination=function(sliderid){
var paginatediv=document.getElementById("paginate-"+sliderid) //reference corresponding pagination DIV for slider
var pcontent=""
for (var i=0; i<slidernodes[sliderid].length; i++) //For each DIV within slider, generate a pagination link
pcontent+='<a href="#" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', '+i+'); return false\">'+(i+1)+'</a> '
pcontent+='<a href="#" style="font-weight: bold;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">Next</a>'
paginatediv.innerHTML=pcontent
paginatediv.onclick=function(){ //cancel auto run sequence (if defined) when user clicks on pagination DIV
if (typeof window[sliderid+"timer"]!="undefined")
clearTimeout(window[sliderid+"timer"])
}
}
Here they are alone with the parts that generate the actual text highlighted:
Code:
pcontent+='<a href="#" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', '+i+'); return false\">'+(i+1)+'</a> '
pcontent+='<a href="#" style="font-weight: bold;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">Next</a>'
Now let's zoom in on these parts and offer alternatives for images:
could be replaced with this code:
Code:
<img src=thumb_'+(i+1)+'.gif border=0>
For that to work, you would need images with these names:
thumb_1.gif
thumb_2.gif
thumb_3.gif
and so on, available for however many content items you have. This part:
is easier. You could just replace it in the code with an image tag:
Code:
<img src=next.gif border=0>
Note: if you want to use the proper (for HTML) quoting:
Code:
<img src=\"thumb_'+(i+1)+'.gif\" border=\"0\">
and:
Code:
<img src=\"next.gif\" border=\"0\">
escape it as shown just to be on the safe side.
Bookmarks