PDA

View Full Version : Problem with stepcarousel



Paci88
01-12-2009, 12:28 PM
1) Script Title: stepcarousel.js

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

3) Describe problem:

Hello everybody,

I'm writing an application using javascript and Jquery. I inserted the stepcarousel that I found on your website.
But, i would like to delete/add rightnav and leftnav if my panels are filled or not.

For example, if only the first panel is filled, we haven't got any arrow, but if the second panel is filled too, we can go on the first and the second panel but not on the third and the fourth.

I tried to modify the source of the carrousel, but i didn't find any solution?

Is anyone can help me?? because i am gonna become crazy...

Thanks a lot for your answers

ddadmin
01-13-2009, 09:57 AM
Try finding the line in the .js file:


if (config.defaultbuttons.enable==true){ //if enable default back/forth nav buttons

and add to that the code in red:


if (config.defaultbuttons.enable==true && config.lastvisiblepanel>0){ //if enable default back/forth nav buttons

This should cause the nav buttons to appear only if there are additional slides other than the ones currently visible, even if you have nav buttons set to be added explicitly.

Paci88
01-21-2009, 01:51 PM
Thanks very much for your reply.

I tried it, but it doesn't seem to work...

I still see arrows.

ddadmin
01-22-2009, 12:54 AM
Works for me actually. Try increasing the width of the Carousel Viewer so it's wide enough to show all panels at once without requiring scrolling, ie:


.stepcarousel{
position: relative; /*leave this value alone*/
border: 10px solid black;
overflow: scroll; /*leave this value alone*/
width: 1070px; /*Width of Carousel Viewer itself*/
height: 200px; /*Height should enough to fit largest content's height*/
}

The nav buttons will no longer appear in this case.