Is this basic idea possible, and if so, how?
$('.myTriggerElement').on('click', function() { $.fancybox.open( [ {imageObject}, {imageObject} ], { option:value, option:value }, function() { var index = 2; //calculate value of index; return index;} ) } );
Having created the click event to open fancybox with an array of images, I want to change the starting image index, depending on other things that may have happened on the page.
When I try to use function(){} for the index value, fancybox just ignores me and defaults to 0.