jQuery
jQuery plugin to add captions to images from image attributes
by Paul Boutin on Jan.17, 2009, under jQuery
I wrote a plugin for jQuery (a JavaScript library), to add a border and caption text to all images with a given class name. I’m a semantic junkie so, the code uses the all of the valid tag attributes in the “img” tag. alt = caption, border = border hspace = left and right margin, vspace = top and bottom margin, align = float position either left or right defaulted to the left blank leaves it inline.
enough talk let’s see it.
This sample uses all defaults of the script the attributes set are border = 1, alt = “testing jQuery captions!”, hspace = 5, vspace = 5, align = left.
(continue reading…)