WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have one weird thing happening with lightbox on my website. If I add a lightbox image or gallery and then click on the image, the first time it will navigate directly to the image file. If you then click the back button and click the image again, lightbox loads up normally.

Any thoughts on why reloading the page after the first click makes lightbox work properly?


example page

share|improve this question

closed as off topic by Tom J Nowell, brasofilo, toscho Jan 29 '13 at 11:29

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

what browser? loads fine in the lightbox first time for me in webkit. – Milo Jan 29 '13 at 2:03
chrome on the mac – Brian Jan 29 '13 at 2:06
Mac Chrome working fine on my end. – brasofilo Jan 29 '13 at 2:16
voted to close, as this appears to be a js/css/networking issue, not an issue with WordPress itself or one that requires WordPress knowledge – Tom J Nowell Jan 29 '13 at 10:42
Also your lightboxes work fine for me on your example page, but there are a number of 404s and the page took a while to load. Consider reducing the filesizes and optimising the size and number of images to reduce bandwidth – Tom J Nowell Jan 29 '13 at 10:44
up vote 1 down vote accepted

Its just you. I tried from fast internet computer and it loads fine the first time. Then I tried from a low speed computer before the page completely loaded, and it acts the way you described. So its all about loading and fast internet connection

share|improve this answer
Ill take your word for it. Thanks – Brian Jan 29 '13 at 5:11
Always test answers before accepting else you're doing a disservice to other users if it's actually wrong – Tom J Nowell Jan 29 '13 at 10:43
It seems to be an intermittent issue with chrome on mac. Tried it on multiple computers. I wasnt able to reproduce on other browsers. – Brian Jan 29 '13 at 16:21

It's because lightbox script starts working, when page is loaded, but if you press link to img before it's loaded, it'll just work like there is no script - just opens image.

share|improve this answer
I always waited for the page to fully load. Thanks – Brian Jan 29 '13 at 16:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.