- This topic has 10 replies, 5 voices, and was last updated 10 years, 6 months ago by Bartosz.
-
AuthorPosts
-
24 February 2014 at 15:59 #2902coni lasParticipant
Hi,
I just installed responsive lightbox on my website and i met this problem : the lightbox does not appear when I click the image first time, other time than I click above it is good and the lightbox appears.
Can anyone tell me what’s wrong ?
Thanks a lot.
Conilas
24 February 2014 at 20:07 #2906BartoszKeymasterPlease post a link to your site.
24 February 2014 at 21:08 #2914coni lasParticipanthttp://www.unehistoirepourlesoir.com/lanniversaire-de-lours/
To reproduce the problem, click on the image, the first time, it’s ko, go back, click another time and then the lightbox appears.
thanks !
26 February 2014 at 10:00 #2943nathalieParticipantHi there Coni las,
Did you put the rel=”lightbox” into the url of your picture? It works when you put Another thing can be that a certain theme that you are using doesn’t work properly. For me the Nivo lightbox theme and the swipe box theme do not work properly. Theme’s that work well are the pretty foto lightbox and the fancybox.
Hope this helps.
Nathalie
26 February 2014 at 21:34 #2947coni lasParticipantThanks for your help,
Yes i put the rel=”lightbox” into the url of the picture. And in my web site i’ve got the fancybox theme, theme who works well but only on the second click on my pĂ®cture, that’s my problem …
conilas
11 March 2014 at 13:39 #3079Ira BrandParticipantHello,
I have the same problem. I have several lightboxes on my website, examples here:
http://www.irabrand.co.uk/?works=the-nearest-exit
http://www.irabrand.co.uk/?works=keine-angstWhen you click on the first image, it does not open it in lightbox, just as a larger image in the browser. The second time you click (either on the same image, or on a different one) it will open it in lightbox and works fine.
Is there a solution to this, to make it successfully open in lightbox the first time?
Thanks very much,
Ira
11 March 2014 at 21:48 #3086Charley UttonParticipantI’ve too got this problem on my website http://www.drivingtochina.co.uk
It worked fine up until I tried it today. So I tried updating the plugin, but to no avail.
Charley
Edit – I’ve just noticed that it’s not necessarily the ‘going back and clicking again’ that’s making it work. If I wait for the page to load entirely, the lightbox will work. But if the loading circle in the tab at the top of the browser window is still spinning (I’m using Google Chrome) then it diverts straight to the picture instead of to the lightbox. I found the same with the websites of the authors above me.
I never noticed this happening before, but perhaps it’s because I was slower to click on to the pictures? I’m not sure how anything could have changed before I updated the plugin – but then, I don’t know if there is any communication between the plugin and a central server that could be slow.
11 March 2014 at 22:22 #3087BartoszKeymaster@coni, check this one:
Error: TypeError: jQuery(…).attr(…) is undefined
Source: http://www.unehistoirepourlesoir.com/wp-content/themes/children/js/hashchange.js
Line: 11@Ira, your theme is using Ajax, so try enabling Custom Events option in plugin settings and see if it makes the difference.
@Charley, there were no significant changes in the plugin recently, but basically that bahaviour comes from the way the jQuery works. Events (like applying lightbox) can be fired when the DOM is ready – when the page (and it’s elements) are fully loaded. If you have some JS skills try to modify the plugin JS code to use $(window).load() instead of $(document).ready().12 March 2014 at 09:20 #3093Charley UttonParticipantThanks Bartosz.
12 March 2014 at 11:57 #3094Ira BrandParticipantHi Bartosz,
I enabled the custom events option as you suggested, but it doesn’t make any difference.
I also don’t think it’s to do with the page still loading. Even when I ensure the page is fully loaded, the first image I click on is always opened in the browser (not lightbox).
Any other suggestions for what I might try?
Thanks,
Ira
12 March 2014 at 12:34 #3095BartoszKeymaster@Ira, it definitely is coused by the way your pages are loaded. If you open your links above – lightbox works as expected. But if you go to next or previous page it’s loaded via Ajax GET request.
Now to apply lightbox you’d need to know the jQuery event name being triggered after page is loaded to use it in plugin settings. I think the theme author should be able to help you here.
-
AuthorPosts
- You must be logged in to reply to this topic.
How to Get Support
After you register and login to the site, you may post all plugin support questions in the Support Forum.
If you need to provide private info, please create a ticket and then reply to it using Set as private reply option.
Sign Up
Please login or sign up for a free account.Sign Up Now