Hi, I’m trying to use Ekko Lightbox for modals on a site that I’m currently developing.
I decided to try and use Bower to install it as I couldn’t get it working by adding the JS file, adding to the manifest and then enqueuing:
➜ sitename git:(V0.2) ✗ bower install --save ekko-lightbox
bower not-cached git://github.com/ashleydw/lightbox.git#*
bower resolve git://github.com/ashleydw/lightbox.git#*
bower download https://github.com/ashleydw/lightbox/archive/v3.3.3.tar.gz
bower extract ekko-lightbox#* archive.tar.gz
bower resolved git://github.com/ashleydw/lightbox.git#3.3.3
bower cached git://github.com/twbs/bootstrap.git#3.3.6
bower validate 3.3.6 against git://github.com/twbs/bootstrap.git#>= 3.0.0
bower install ekko-lightbox#3.3.3
bower install bootstrap#3.3.6
Ekko appears to be installed and has been added to my main.js file
I’ve added the correct anchor tag as well (works on the static site):
<a class="play" href="http://vimeo.com/146572703" data-remote="http://player.vimeo.com/video/146572703" data-toggle="lightbox">
...
</a>
I think my problem is that I can’t figure out how to implement it:
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
I’ve tried adding the above code to a custom.js, adding that to the manifest and then enqueueing (the JS file appears when I inspect the code), but it still doesn’t appear to work.
Any help would be greatly appreciated!
Cheers,
Jamie