sbh
02-02-2010, 11:05 PM
1) Script Title: Featured Content Slider v2.4
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
3) Describe problem: I have an external.htm file that has 15 separate <div class="contentdiv">. Currently the prev and next buttons allow the user to cycle through all of the content, works fine. Need to limit prev and next buttons to only cycle through sets of 3 <div class="contentdiv"> at a time and I am trying to do this using the onChange and element IDs.
Link to the example: http://www.samhuss.org/testsites/dwelling/gallery_template6.html
Here is my work so far, I don't know how to get the prev and next button to stop at the desired Id's ...am I even close? Please help. Thank you in advance.
[CODE]
onChange: function(previndex, curindex){
var name = 1
var name = 2
var name = 3
var name = 4
var name = 5
if (previndex == 1)
var name = document.getElementById("project1")
else if (previndex == 2)
var name = document.getElementById("project2")
else if (previndex == 3)
var name = document.getElementById("project3")
else if (previndex == 4)
var name = document.getElementById("project4")
else if (previndex == 5)
var name = document.getElementById("project5")
}
[code]
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
3) Describe problem: I have an external.htm file that has 15 separate <div class="contentdiv">. Currently the prev and next buttons allow the user to cycle through all of the content, works fine. Need to limit prev and next buttons to only cycle through sets of 3 <div class="contentdiv"> at a time and I am trying to do this using the onChange and element IDs.
Link to the example: http://www.samhuss.org/testsites/dwelling/gallery_template6.html
Here is my work so far, I don't know how to get the prev and next button to stop at the desired Id's ...am I even close? Please help. Thank you in advance.
[CODE]
onChange: function(previndex, curindex){
var name = 1
var name = 2
var name = 3
var name = 4
var name = 5
if (previndex == 1)
var name = document.getElementById("project1")
else if (previndex == 2)
var name = document.getElementById("project2")
else if (previndex == 3)
var name = document.getElementById("project3")
else if (previndex == 4)
var name = document.getElementById("project4")
else if (previndex == 5)
var name = document.getElementById("project5")
}
[code]