Manually calling Featherlight gallery starts from first image always no matter what I click

143 Views Asked by At

http://jsfiddle.net/JNsu6/893/

$(".column").click(function (e) {
    e.preventDefault();
  $.featherlightGallery($(".column"));
});

You can see it here.

Clicking on the second image still opens the first one if I have a click event, that triggers the manual calling of the gallery.

Am I missing something? Documentation doesn't specify much.

1

There are 1 best solutions below

3
On BEST ANSWER

You can specify the "first item" with the $currentTarget option:

$.featherlightGallery($(".column"), {$currentTarget: $('the first item, maybe this in your case?')});