本文介绍了如何向JCarousel添加描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用jcarousel.我无法在滑块中为照片添加说明.
I am using jcarousel. I can't add description to photo in slider.
<div id="jcarousel"> <ul id="mycarousel" class="jcarousel-skin-tango"> <li> <img src="images/about_img1.jpg"/> </li> </ul> </div>推荐答案
您可以在jCarousel容器之后创建一个div,并在jQuery中的下一个和上一个按钮单击回调函数上更改div的内容.检查一下:
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>在您的jquery代码中:
In your jquery code:
保留数据结构,例如所有标题均使用数组.并根据显示的图像更改标题.
Keep a data structure, say array for all captions. And change the caption according to image being shown.
希望这会有所帮助.
更多推荐
如何向JCarousel添加描述
发布评论