dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

issues in conjunction with owl slider #912

Open nicmare opened 9 years ago

nicmare commented 9 years ago

i am sure this issue was discussed before but i can't find it. i am using owl slider on some places. for example here: http://www.aqualux.de/umgebung/ when you click an item, photoswipe opens. but without gallery. i think this happens because owl slider manipulates the dom for maximum perforance. any idea how to fix that?

i use the nearly the same markup at another place where it works (but without owl): http://www.aqualux.de/gallery/galerie/

dimsemenov commented 9 years ago

If your markup differers from default example in documentation http://photoswipe.com/documentation/getting-started.html#dom-to-slide-objects , you'll need to edit initialization code, specifically parseThumbnailElements function.

nicmare commented 9 years ago

yes. its the exact markup i am using. but then, owl slider modifies it. so do i have to change the javascript code for photoswipe too? this is the JS code from your example: http://www.aqualux.de/wp-content/themes/bootstrap/assets/js/photoswipe.setup.js

rolecs commented 6 years ago

I did it with jquery solution from here: https://webdesign.tutsplus.com/tutorials/the-perfect-lightbox-using-photoswipe-with-jquery--cms-23587

https://jsfiddle.net/g93vno87/8/