nathansearles/slidesjs

How to add captions to a separate div + add "current" class to the active slide

o-l-e opened this issue · 0 comments

Hi again,

i am trying to add captions to my slider, and was hoping you could give some advice on how to achieve this. I was trying to figure out what the class of the "current slide" was, so that i could simply show/hide the caption with css, but i could not find it. I know the pagination has this function.

What i want to do is this:

    <div id="slides">
        <div><img src="img/01.jpg" /><p>This is a caption</p></div>
        <div><h1>This is inline text</h1><p>This is a caption</p></div>
        <div><img src="img/02.jpg" /><p>This is a caption</p></div>
        <div><img src="img/03.jpg" /><p>This is a caption</p></div>
    </div>

    <div class="captions">
        <!-- inject each caption in here and add a "current" class -->
    </div>

I was hoping to use css3 animations to crossfade the captions later, but i don't even know if the example above is possible?

Thanks for the help in advance, i almost got my slider the way i need it.
Any advice would be great!