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.

  1. you need add new html tag contain caption, use div example

  2. add jquery code select div , change text

here have example: http://goo.gl/h8jjk3


Comments

Popular posts from this blog

bash - How do you programmatically add a bats test? -

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

java - Getting exception in JDBC thin driver -