Lightbox.options is not a function - lightbox plugin
I am using this lightbox plugin,
http://lokeshdhakar.com/projects/lightbox2/
https://github.com/lokesh/lightbox2/
I have elements on a page similar to the example:
<a href="images/image-2.jpg" data-lightbox="my-image">Image #2</a>
<a href="images/image-3.jpg" data-lightbox="my-image">Image #3</a>
<a href="images/image-4.jpg" data-lightbox="my-image">Image #4</a>
it works fine, but i want to change some options, for which according to the documentation http://lokeshdhakar.com/projects/lightbox2/#options it should be
lightbox.option({
'resizeDuration': 200,
'wrapAround': true
})
however I am getting the error
lightbox.option is not a function
So how do I set the parameters I want?
edit: I have an option AFTER where the js lightbox is loaded.
edit2: also the parameters snippet is inside the finished document
edit3: lightbox loaded and works fine
+3
source to share
2 answers