Lightbox setup for single images without <a> tag #316
Answered
by
sogrbilja
igor-baiborodine
asked this question in
Q&A
|
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'
}); |
Answered by
sogrbilja
Sep 17, 2024
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. |
0 replies
After examining what isValidLink I concluded that it can be done! Look: You "just" need to specify another attribute with the sourceAttr property |
0 replies
Answer selected by
igor-baiborodine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After examining what isValidLink I concluded that it can be done! Look:
You "just" need to specify another attribute with the sourceAttr …