View Full Version : Featured Content slider - get rid of next button

11-19-2007, 07:50 PM
1) Featured content slider

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

3) Describe problem:
How do I get rid of the "next" button?

Thanks very much for this script, I am loving it.

I also posted a question about the Featured Content Slider in another thread


- I'm not sure if that was the right thing to do, but since my question was about a modified version of the contentslider.js that was in that thread, I thought I should post it there.

11-20-2007, 09:25 AM
Inside the .js file, try finding the line below, and add to it the change in red:

pcontent+='<a href="#" style="font-weight: bold; display:none" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">'+(slider.nextText || "Next")+'</a>'

That should do it.

p.s: Yep, you're doing it correctly, by starting a new thread for your own question on a DD script, even if it's based on a modified version, as long as you also link to that version, so we know what you're referring to. :)

11-25-2007, 04:37 PM
Or you may look for the second 'pcontent+=' and change the whole block into something like this:

pcontent+= slider.nextText ? '<a href="#" style="font-weight: bold;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">'+slider.nextText+'</a>' : ''

This will remove the supposed "Next" tab if you specified "" value in the [customnextlinktext] field.

ContentSlider.turnpage=function(sliderid, thepage){
var slider=document.getElementById(sliderid)
paginatelinks[paginatelinks.length-1].setAttribute("rel", thenextpage=(thepage<paginatelinks.length-(slider.nextText?2:1))? thepage+1 : 0)

The highlighted codes should also be changed for the autoturn page to work properly.


11-26-2007, 12:14 AM
Thank you re77ie and ddadmin! Meanwhile, I'm trying to figure out another issue with the featured content slider in another thread...:)