How To Add Description To JCarousel

后端 未结 1 1099
逝去的感伤
逝去的感伤 2021-01-28 04:34

I am using jcarousel. I can\'t add description to photo in slider.

相关标签:
1条回答
  • 2021-01-28 04:58

    You can create a div after your jCarousel container and change the content of the div on next and previous button click callback function in jQuery. Check this:

    <div id="jcarousel">
        <ul id="mycarousel" class="jcarousel-skin-tango">
            <li>
                <img src="images/about_img1.jpg"/>
            </li>                
        </ul>
    </div>
    <div id="description">
        <label id="caption">First image</label>
    </div>
    

    In your jquery code:

    Keep a data structure, say array for all captions. And change the caption according to image being shown.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题