Add wrapper element in markup #1995
Unanswered
silentbugs
asked this question in
Q&A
Replies: 1 comment
-
You'll need to either entirely override the content, as shown here https://photoswipe.com/custom-content/ Or you can preventDefault |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to add an element between
pswp__zoom-wrap
andpswp__img
elements, so that I can style it and position it since styling/positioning thepswp__zoom-wrap
element seems to break some things.Is there some easy way to do this without providing an entirely custom markup?
My approach (possibly bad):
I tried to use
loadComplete
event and append all elements (currently just thepswp__img
element) ofslide.container
to another element, and then append that element toslide.container
.This seems to work fine within the callback function of the
loadComplete
event, but as soon as photoswipe fully loads, the child element ofpswp__slide-wrapper
becomes its sibling.During
loadComplete
:After
loadComplete
:Beta Was this translation helpful? Give feedback.
All reactions