I have try to put photo into array and call each photo I click to show the photo index.
But the 1st photo array 0 not showing until I swipe left or right then it will show.
Is there something wrong in my code ?
here my code
var photos = [];
for (var i = 0; i < arrSize; i++) {
photos[i] = arrData;
}
var myPhotoBrowserDark = app.photoBrowser.create({
photos,
theme: 'dark'
});
$$('.pb').on('click', function () {
var photoIndex = $$(this).attr("data-index");
myPhotoBrowserDark.open(photoIndex);
});