codaslider
codaslider copied to clipboard
Panel cloning happens twice for slider inside anoter slider (continuous: yes)
I have an html slider for which I'd want the first panel to be a photo slider.
The code looks like this:
<div id="mainslider" class="coda-slider">
<div>
<h2 class="panel-title>Photoset</h2>
<div id="photoslider" class="code-slider">
<div>
<span class="photo-title>photo 1</span>
<img src=pic1.jpg"/>
</div>
<div>
<span class="photo-title>photo 2</span>
<img src=pic2.jpg"/>
</div>
</div>
</div>
<div>
<h2 class="panel-title>Panel 2</h2>
<div>
<p> Some content ... </p>
</div>
</div>
</div>
If I set both #mainslider
and #photoslider
to continuous: true
, the panels ofor #photoslider
are repeated twice, resulting in the slider showing 4 panels instead of 2.
I suppose this is a problem with the panel cloning but couldn't find how to fix it :-(
Yeah, and I'm not sure it would be an easy fix either. It would have to check whether or not there are embedded sliders. It's not something that comes up enough to warrant a change. Plus, because it's a clone, it would look bad on the continuous slide (the state of the embedded slider could be in a different position than the clone).
Better to just turn off continuous on the outer slider.
Indeed, turning off continuous on the outer slider worked for me.
Continuous slider inside another continuous slider is probably a corner case. Would be nice to fix it, but if it's taking too much work, I suppose it can stay like that until someone can find the time.
Coda Slider is great anyway, thanks for the good work there.