One jquery plugin that I know supports links in the captions is the NIVO slider. Basically what I have is a jquery plugin that uses the alt attribute of an image to display it as a caption. I was wondering how difficult it would be to reference a DIV in the alt attribute and have it display the DIV.
Here’s the jquery:
$('.thumb_container').click(function(){
var handler = $(this).find('.large_image');
var newsrc = handler.attr('src');
var newcaption = handler.attr("alt");
loadPhoto(newsrc, newcaption);
});
So what I want is the alt attribute of an image to reference a DIV (i.e. alt=”#example”) and in the DIV will be a link that will be shown as the caption. Is there any easy way to do this? What I have above works, but the caption displays #example not what is in the #example DIV.
try this:
focus on the jquery selector around handler.attr(“alt”)