Results 1 to 4 of 4

Thread: Featured Content slider - get rid of next button

  1. #1
    Join Date
    Nov 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Featured Content slider - get rid of next button

    1) Featured content slider

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tentslider.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

    http://www.dynamicdrive.com/forums/s...ad.php?t=20748

    - 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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Inside the .js file, try finding the line below, and add to it the change in red:

    Code:
    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.

  3. #3
    Join Date
    Nov 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.


    Reggie
    Last edited by re77ie; 12-01-2007 at 12:57 AM. Reason: I missed to include the modification for autoturn page

  4. #4
    Join Date
    Nov 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you re77ie and ddadmin! Meanwhile, I'm trying to figure out another issue with the featured content slider in another thread...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •