› Forums › Easy FancyBox Pro › Auto-Popup shows img-link 2 times
Tagged: auto-popup img show two times
- This topic has 6 replies, 2 voices, and was last updated 6 years, 10 months ago by
Christoph Müller.
-
AuthorPosts
-
-
29 November 2016 at 23:03 #7447
Christoph Müller
ParticipantHello, this is how I include the img:
<a href="http://domain.com/news/1.jpg" id="fancybox-auto"></a>
It is displayed two times (one above the other).
what am I doing wrong?thanks for your help
-
29 November 2016 at 23:54 #7448
Christoph Müller
Participantgot it:
<div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1"> <img src="/news/1.jpg"></div></div> <a href="#fancyboxID-1" class="fancybox-inline" id="fancybox-auto"></a>
-
30 November 2016 at 16:45 #7452
Rolf
KeymasterHi Christoph, with that second method you ar actually using inline content mode for images which might not scale the light box to the image size correctly on all devices. Best to use the method that you started with.
I’d need to see your web site to be able to tell you why the light box shows twice… It sounds like there are two light box scripts running at the same time.
Can you share a link?
-
30 November 2016 at 17:30 #7454
Christoph Müller
ParticipantHi, thanks for your help! thats right, I have read the faq and inserted the code snippet for resolutions smaller than 640…
I guess I know what was wrong, in Media Settings I’ve also selected “Enable FancyBox for: Images”. When its not selected it only comes up one time.
One more question: If I use first method with img, will the image automatically down scaled for mobile devices?
-
30 November 2016 at 19:17 #7456
Rolf
Keymasterin Media Settings I’ve also selected “Enable FancyBox for: Images”. When its not selected it only comes up one time.
That’s not expected behavior. It should only come up one time when that option IS selected. When not selected, the popup should fail.
I’d need to see your site to be able to tell what is going wrong. If you can send me a link via the contact form I can take a look.
One more question: If I use first method with img, will the image automatically down scaled for mobile devices?
Yes it should downscale to fit the browser.
-
30 November 2016 at 23:42 #7460
Rolf
KeymasterThank you for the link.
Looking at your site source code, I notice there is another light box script loaded: colorbox.js
It’s included by your theme and I suspect that is the one that is causing the double light box effect because it is set to bind itself automatically to any image links.
Is there is a theme option to switch off its light box effect? If not, and if you’re capable of modifying a theme, then you could remove the script (and all its related code!) manually.
Otherwise, your options are:
A. Continue using the solution you found, with “fancybox-inline” and Images disabled; or…
B. Go back to your original direct image link again (you can remove the hidden content div after you made sure it works) but leave the “Images” option on Settings > Media unchecked. You’ll need to leave Inline Content (or any other option except Images) activated on Settings > Media or the auto-popup will stop working.
Note that with option B, Colorbox will be used instead of Fancybox to show the popup image on your front page.
-
1 December 2016 at 00:07 #7461
Christoph Müller
ParticipantThats It! Easily deactivated in Theme Options! Thank you very much!!!
-
-
AuthorPosts
- You must be logged in to reply to this topic.