开发者

How to render image caption to lightbox caption using jquery?

I've caption under every image

<p>
<a href="large.jpg"> 
<img width="85" height="75" src="thumb.jpg/>
</a>Caption</p>

I want to render same caption at bottom of lightbox.

<span id="lightbox-image-details-caption">...Here.......</span>

How to do this?

开发者_如何学C

How to render image caption to lightbox caption using jquery?


The normal way is too include a title attribute in your link;

<p>
<a href="large.jpg" title="Your Caption"> 
<img width="85" height="75" src="thumb.jpg" />
</a>
</p>

This title will be published in <span id="lightbox-image-details-caption"></span> Will this work for you or do you need to add the text after the image as you've done now?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜