Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Lightview using API with group / change options without using Lightview.show()

edited September 2015 in Lightview
I've started using Lightview but I need some explanation on how to use the API.

I have some thumbnails displayed on a page :
<div id="thumbnail">
<a href="images/big1.jpg" class="lightview" data-lightview-group="group1">
<img src="images/thumbnail1.jpg">
</a>
<a href="images/big2.jpg" class="lightview" data-lightview-group="group1">
<img src="images/thumbnail2.jpg">
</a>
<a href="images/big3.jpg" class="lightview" data-lightview-group="group1">
<img src="images/thumbnail3.jpg">
</a>
</div>
If I click on the last link, it opens Lightview with the third big image, I can go next or previous.
=> OK

Now I want to use the API :

1. How can I use Lightview.show() to works with all image of the group without getting all URL ?
I'm working with Wordpress and there's no easy way to get all the image URL.
$('#thumbnail a').bind('click', function(event) {
event.preventDefault();
Lightview.show({
url: $(this).attr('href')
})
});
=> I see the full size image from the thumbnail I've clicked, but there's no navigation, no way to associate to the "group".

2. Is there a way using the API to change background (options) without "showing" an image ?

I mean, in the documentation, I always see Lightview.show() but how can I change options without showing an image ?
Something like Lightview.options({ ... }) ?

Comments

Sign In or Register to comment.