PDA

View Full Version : Disable pagination in featured content slider



draytoc
01-11-2009, 08:08 AM
1) Script Title: Feaured content slider

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem:

I'd like to remove the pagination section completely. If I remove the DIV for "paginate-slider4" in my page, the main image section is also removed. I have worked around this by changing the css so that all the paginate styles are empty like this...



.pagination{

}

.pagination a{
}

.pagination a:hover, .pagination a.selected{
}

#paginate-slider4{
}

#paginate-slider4 a
{
}


#paginate-slider4 a img
{
}

#paginate-slider4 a.selected img
{
}


But I dont think this is the right way to do it. Doesnt seem very clean. Can anyone advise on the best way to remove the pagination section completely? Is there something I can remove from the javascript file?

Many thanks.

draytoc
01-12-2009, 12:12 PM
Anyone?

ddadmin
01-13-2009, 10:27 AM
Hmm why not just set the pagination DIV to be hidden using CSS? That's the easiest way I can think of. The code in red highlights this:


<div id="slider1" class="sliderwrapper">

<div class="contentdiv">
Content 1 Here. <br />
<p></p><a href="javascript:featuredcontentslider.jumpTo('slider1', 3)">Go to 3rd slide</a></p>
</div>

<div class="contentdiv">
Content 2 Here.
</div>

<div class="contentdiv">
Content 3 Here.
</div>

</div>

<div id="paginate-slider1" class="pagination" style="display:none">

</div>

<script type="text/javascript">

featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
enablefade: [true, 0.2], //[true/false, fadedegree]
autorotate: [true, 3000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
}
})

</script>