Lightbox setup for single images without <a> tag #316
-
Hi, Can your Simple Lightbox be used for single images without a For example: <p>
<img src="<path-to-image>" alt="<image-description">
</p> I tried this setup, but it does not work: new SimpleLightbox('p img', {
sourceAttr:'img'
}); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I am not associated with this project and I have the same question. By examining the click event on the anchor element I see that it can't, look:
However, I don't understand why an anchor is needed for this. It could be any of the elements. |
Beta Was this translation helpful? Give feedback.
-
After examining what isValidLink I concluded that it can be done! Look:
You "just" need to specify another attribute with the sourceAttr property |
Beta Was this translation helpful? Give feedback.
After examining what isValidLink I concluded that it can be done! Look:
You "just" need to specify another attribute with the sourceAttr …