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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -