javascript - How to make a caption with images in jquery gallery -
i have image gallery i'm working on
example: http://imagethrow.com/design-studio-all-throws.html
right displays images, i'd have each image has caption either above or below image.
this html part of gallery:
<a class="imglink" href="path-to-the-image.jpg">image name</a> <img src="" id="theimage"> jquery:
<script> $(document).ready(function(){ $('.imglink').click(function(){ var imgpath = $(this).attr('href'); $('#theimage').attr('src',imgpath); return false; }); }); if it's possible tweak above code add caption ideal.
you need add new html tag contain caption, use div example
add jquery code select div , change text
here have example: http://goo.gl/h8jjk3
Comments
Post a Comment