photoswipe.min.js:4 -- Uncaught TypeError: Cannot read property 'firstChild' of undefined(…) #1255

Open
ZAJDAN opened this Issue Dec 20, 2016 · 5 comments

Projects

None yet

3 participants

@ZAJDAN
ZAJDAN commented Dec 20, 2016 edited

Hello,
right now I am trying use the Photoswipe, but I am facing a problem:
Uncaught TypeError: Cannot read property 'firstChild' of undefined(…) ...photoswipe.min.js:4

getChildByClass @ photoswipe.min.js:4
init @ photoswipe.min.js:4
openPhotoSwipe @ private.js:30
(anonymous function) @ private.js:33

Thanks for any hint

@svdg
svdg commented Dec 20, 2016

I have this problem too, help is very appreciated.

@svdg
svdg commented Dec 20, 2016

This Codepen got me going: https://codepen.io/dimsemenov/pen/ZYbPJM. Very nice photo swiper, awesome piece of work!

@ZAJDAN
ZAJDAN commented Dec 21, 2016

so You want to say, that this code works on your website?

@svdg
svdg commented Dec 21, 2016
@fabricionaweb

Your first instance argument (pswpElement) need to be DOM Element, like a document.querySelector or jquery $('selector')[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment