You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking to set a class on the lightbox image based on the link clicked... I want to have specific styles based on the layout of an image so landscape, portrait or square.
I want to apply a class to the dynamic lightbox sl-wrapper based on the aspect of the image clicked (this is currently both a class and also a data-aspect=“@aspect” that is applied to the tag) I have tried to use the className property but this doesn’t seem to work based on a var set on click of the image (although it will alert/console.log the correct value)…
I then also want this to update based on the image shown.
Any help appreciated!
The text was updated successfully, but these errors were encountered:
I am looking to set a class on the lightbox image based on the link clicked... I want to have specific styles based on the layout of an image so landscape, portrait or square.
I want to apply a class to the dynamic lightbox
sl-wrapper
based on the aspect of the image clicked (this is currently both a class and also a data-aspect=“@aspect” that is applied to the tag) I have tried to use theclassName
property but this doesn’t seem to work based on a var set on click of the image (although it will alert/console.log the correct value)…I then also want this to update based on the image shown.
Any help appreciated!
The text was updated successfully, but these errors were encountered: