singletrack
08-26-2009, 04:31 AM
1) Script Title: Featured Content Slider
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
3) Describe problem: I'm looking to tweak the DD script so the 'next' and previous' links are images placed elsewhere on the page. I have hidden the text labels for "next" and "previous" by following the DD instructions which works as expected. However, I want to call the next and previous slide by clicking on two images either side of the slilder. Below is a screen grab of my intended outcome. If you can assist I would be very grateful. Many thanks.
(visual: http://www.flickr.com/photos/41870113@N06/3858343624/)
Here is my code:
<div id="portfoliocontainer">
<div id="portfolio_arrows">
<a href="#"><img src="../images/arrow_l.jpg" alt="left arrow" width="76" height="76" /></a>
</div>
<div id="portfolio_middle">
<!--Inner content DIVs should always carry "contentdiv" CSS class-->
<!--Pagination DIV should always carry "paginate-SLIDERID" CSS class-->
<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"></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: ["", ""], //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.1], //[true/false, fadedegree]
autorotate: [false, 5000], //[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>
</div>
<div id="portfolio_arrows">
<a href="#"><img src="../images/arrow_r.jpg" alt="right arrow" width="76" height="76" /></a>
</div>
</div>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
3) Describe problem: I'm looking to tweak the DD script so the 'next' and previous' links are images placed elsewhere on the page. I have hidden the text labels for "next" and "previous" by following the DD instructions which works as expected. However, I want to call the next and previous slide by clicking on two images either side of the slilder. Below is a screen grab of my intended outcome. If you can assist I would be very grateful. Many thanks.
(visual: http://www.flickr.com/photos/41870113@N06/3858343624/)
Here is my code:
<div id="portfoliocontainer">
<div id="portfolio_arrows">
<a href="#"><img src="../images/arrow_l.jpg" alt="left arrow" width="76" height="76" /></a>
</div>
<div id="portfolio_middle">
<!--Inner content DIVs should always carry "contentdiv" CSS class-->
<!--Pagination DIV should always carry "paginate-SLIDERID" CSS class-->
<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"></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: ["", ""], //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.1], //[true/false, fadedegree]
autorotate: [false, 5000], //[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>
</div>
<div id="portfolio_arrows">
<a href="#"><img src="../images/arrow_r.jpg" alt="right arrow" width="76" height="76" /></a>
</div>
</div>