zoom.js
zoom.js copied to clipboard
Image disappears on zoom
Can't work this one out at all! Image starts to zoom then vanishes, leaving only the overlay. Both images on homepage (and elsewhere) exhibit this. https://classictheatrecumbria.co.uk
Only thing I can think of is that I'm having to strip the http: or https: from all links to validate the SSL. Not sure what to do about that.
Ignore me! Sorry, problem with overlay z-index.
This is happening to me as well. What was your solution? I've been messing with the z-index settings to try and get it working but still same issue as you.
I'm having the same issue. Any fix yet?
Having the same issue here. If the image is placed in a (relative) container with a z-index specified, you're probably screwed. The overlay will cover the container, and since the image has a z-index relative to its container, the image gets covered as well.
same issue.. so how to fix it? @oscaralexander
I created a PR to fix it.
the core diff is changing the zoom-overlay position from the <body>
child to .zoom-img-wrap
bro.
@geekplux Thanks for your contribution, however your commit doesn't work for me. I'm trying to zoom images that live within a swiper slide (https://github.com/nolimits4web/Swiper).
Could you please tell me what you meant by changing the .zoom-overlay position? You mean that this element should be a child of .zoom-img-wrap?
@cloudrocketsoftware Thanks :)
No, the .zoom-overlay
should be a brother of .zoom-img-wrap
, not child.
You would understand easily If you checked my code in my PR #78.
- document.body.appendChild(this._overlay)
+ this._targetImageWrap.parentNode.insertBefore(this._overlay, this._targetImageWrap)
https://github.com/fat/zoom.js/pull/78/files#diff-3480795a24ca13743948f6ea832c7c5dR160
I have the same problem when I use bxSlider. If I apply this, the image appears but overlay don't.
Moving onto the fork; https://github.com/spinningarrow/zoom-vanilla.js, solved my issues.
@geekplux Your change worked for me. Danke!
@kakoni thanks! zoom-vanilla.js works for me.