View Full Version : Nav button positions in step carousel

08-28-2008, 05:15 AM
1) Script Title: Step Carousel Viewer 1.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) I think this is a bug but I'm asking for help in case its my understanding.

The left and right have buttons are set up with a positon:absolute with respect to the body div. This is done on page load. This works fine with everything left aligned, but if you put step carousel in another div, which is setup to remain horizontally centred within the browser window, and then you resize the browser window, the carousel moves left or right but the nav buttons stay in the same place.


08-28-2008, 06:03 AM
Try finding the below line inside the .js file:

$(window).bind("load", function(){

and change it to:

$(window).bind("load, resize", function(){

I've updated the .js file on DD with the fix as well btw.

08-30-2008, 12:20 AM
I'm afraid it didnt work. No difference at all. Would a better solution be to position the nav buttons within the enclosing div which would be the carousel viewer. Then if the carousel viewer is respositioned then all the child elements including the nav buttons would move with it.

08-30-2008, 06:18 AM
So the nav buttons are initially positioned correctly when the page first loads, but no longer when you resize the window right? If so, what I posted above should do it. Please post a link to the page on your site that contains the problematic script so we can check it out.

08-30-2008, 06:57 AM
I finally found it - I put "load,resize", whereas you said "load, resize" with a space after the comma (!!) that fixed it. Thanks for your help

09-12-2008, 03:36 PM
Hey Guys I am having the same problem. Does it have anything to do with me using my own images? or the fact that they are jpg instead of gif? I searched for the code in the stepcarousel.js and it was already updated but it had the space between the comma... I removed the space between the comma and still it did not work.

http://www.doximagry.com is where I am using the script. Any help would greatly be appreciated thank you. also the javascript is located at http://www.doximagry.com/js/stepcarousel.js

I just liked to restate that everything has worked perfectly until I changed the images...

09-13-2008, 01:27 AM
Try replacing your version of stepcarousel.js with the latest version: http://www.dynamicdrive.com/dynamicindex4/stepcarousel.js See if that changes anything.

09-13-2008, 07:35 AM
I replaced the script with the one you provided...the arrows still disappear on reload :confused: by the way thanks for the quick response

09-14-2008, 05:36 AM
I don't see the .js file updated actually. Anyhow, inside your current version, find the below line:

$(window).bind("load,resize", function(){ //refresh position of nav buttons when page loads/resizes, in case offsets weren't available document.oncontentload

Change the portion in red to:

load resize

In other words, remove the comma, add a space.

09-22-2008, 09:01 PM
Hello... thanks for all of the help...unfortunately by removing the comma and adding the space the buttons disappear completely...they dont even show up by clearing the cache...:confused: My website is not done yet..so no big deal..but I'd love to have the issue fixed by the time I have all the content ready for display ..thanks again for your time and insight

10-04-2008, 06:35 AM
Have you tried simply using the latest version of Step Carousel script (http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm) (the .js file that is). It incorporates the initial shortcoming raised in this thtread, and if the demo works for you, that means it should on your page as well.

10-04-2008, 07:40 PM
My apologies I missed something so simple! The script works perfectly.. thanks for all the help! Many thanks