lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.24k stars 1.77k forks source link

Not Loading in Laravel11 Livewire3 project (lightbox2) #752

Open Creekmore108 opened 7 months ago

Creekmore108 commented 7 months ago

Not working in Laravel11 Livewire3 project What version of Lightbox2 you are using? version 2

Which browsers and operating systems have you seen the issue on? Chrome Version 124.0.6367.62 (Official Build) (x86_64) on a Mac

What are the steps to reproduce the bug? Setup in a Laravel11 Livewire3 project and getting image with black background. I tried with two different test sites generated to try and resolve this issue.

Do you have link to a live site where the bug is visible? or can you post relevant HTML, CSS, and Javascript? js/app.js import './bootstrap'; import jQuery from './jquery';

window.$ = jQuery; window.jQuery = jQuery;

import './lightbox';

cs/app.css @import './lightbox.css';

=============================== blade file

I tried using just the CDN files as well.

truckee commented 5 months ago

I'm experiencing the same problem as above. My configuration is identical working in Symfony. Lighgtbox2 is imported in that it appears in a page's HTML: "lightbox2": "/assets/vendor/lightbox2/lightbox2.index-3d584173438145230243225cbabb180a.js" but that's all.

Attempts to add an option with:

<script>
    lightbox.option({
      'resizeDuration': 200,
      'wrapAround': true
    })
</script>

yields lightbox not defined