It has been brought to my attention that the release of Lightbox 2.0.4 broke some stuff in flashLightBoxInjector 1.2. After investigating the issue, it turns out that one (1) tiny change to the lightbox.js
file is needed in order to get flashLightBoxInjector
working with Lightbox 2.0.4.
In Lightbox 2.0.4 Lokesh (the author of Lightbox) decided to create the Lightbox instance without storing it into a variable. As flashLightBoxInjector
relies on that variable, things broke. Now, to fix this follow this tiny procedure and it’ll work just fine, as it did with version 2.0.3:
- Open
lightbox.js
with your favorite texteditor - Scroll down to the very last line where it reads [js]document.observe(‘dom:loaded’, function () { new Lightbox(); });[/js]
- Replace that line with this [js]document.observe(‘dom:loaded’, function () { myLightbox = new Lightbox(); });[/js]
- Save your file and … that’s it 🙂
I’ve changed the online example and flashLightBoxInjector 1.2
download and demos here on bram.us to include that change, so you can roll with it “out of the box”. Above that I’ve mailed Lokesh about this issue, hoping to see the variable reappear in a next release.
There is no need to change lightbox.js.I just change mylightbox to lightbox and fixed problem
Good man – knew someone would have solved it. Thanks!