Search code examples
lightbox2

lightbox2 working in Live Preview, but not on server


I followed the instructions on the lightbox page (https://lokeshdhakar.com/projects/lightbox2/#getting-started) and everything works just as it should in Live Preview of my code editor, Brackets - but when I upload the page to my server, although the modal opens correctly from the thumbnail, I don't get the nav controls (prev and next and close button), or the image caption or numbering ("Image 1 of x") on the bottom left. Not sure why this would be. Can anyone assist? Thanks.


Solution

  • Super-embarrassed here to admit my mistake, but I neglected to upload the Lightbox css and js files to my server - which was why the code worked in Live Preview but not on the server. Duh! Couldn't see the forest for the trees ...