Closed MurzNN closed 5 years ago
You can provide your own caption text by including a <div class="caption">
just after the <img>
tag.
http://miromannino.github.io/Justified-Gallery/captions/
The script will use the title
attribute if there's no alt
attribute, but not having an alt
attribute is bad practice. To get it to use the title
attribute in all cases would take a little quick script-hacking, on line 226 of justifiedGallery.js.
I know that empty alt
is bad, but in my project alt
contains text, but we need to display to user longer text from other field. Thanks, via <div class="caption">
this works well, even with formatting!
Yes, I use the explicit caption div - you can load it up with almost anything!
Is it possible to get image caption text not from image
alt
attribute, but fromtitle
attribute, or separate html tag (via jquery selector)?