This repository was archived by the owner on Nov 28, 2023. It is now read-only.
This repository was archived by the owner on Nov 28, 2023. It is now read-only.
Lightbox fails to attach event handler to elements and also fails to work at all #9
Open
Description
The JS file is included in the head and apparently that results in the event 'click' handler not being applied to the element. When I put //= require lightbox
in its own JS file and included it near the bottom of the <body>
tag the event handler was successfully attached.
However it still didn't help anything as the link still navigates directly to the image and doesn't stay on the page and load the lightbox.
My link has data-lightbox="weddings"
attribute. Also for what its worth, the JS console reads (in Google Chrome): Resource interpreted as Document but transferred with MIME type image/jpeg: "[image URL]".
I'm using jQuery v2.2.1 (using jquery-rails and //= require jquery2
inside of application.js)
Metadata
Metadata
Assignees
Labels
No labels