As per your instructions, I'm trying to programatically change the slide we are on:
var gallery_el = document.getElementById('the-gallery');
window.VARS.gallery = lightGallery(gallery_el, {
thumbnail:true,
controls: true,
dynamicEl: window.VARS.gallery_photos,
download: false,
counter: false,
dynamic: true,
index: window.VARS.goto_slide // this works first time, but not on re-opening when you want a differentone
});
console.dir(window.lgData[gallery_el.getAttribute('lg-uid')]);
console.log("FOO: " + gallery_el.getAttribute('lg-uid') + " , on " + window.VARS.goto_slide)
window.lgData[gallery_el.getAttribute('lg-uid')].slide(window.VARS.goto_slide);
I get an error:
TypeError: t is undefined
The debug seems ok:
FOO: lg0 , on 1
I don't seem to be able to see the slide() function though, so maybe I'm missing something?
This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.
Hi,
As per your instructions, I'm trying to programatically change the slide we are on:
I get an error:
The debug seems ok:
I don't seem to be able to see the slide() function though, so maybe I'm missing something?