Fix bugs in section files
This commit is contained in:
@@ -1 +1,45 @@
|
||||
<script src="{{ url_for('static', filename='docs.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='glightbox.min.js') }}"></script>
|
||||
<script>
|
||||
var lightbox = GLightbox();
|
||||
lightbox.on('open', (target) => {
|
||||
console.log('lightbox opened');
|
||||
});
|
||||
var lightboxDescription = GLightbox({
|
||||
selector: '.glightbox2'
|
||||
});
|
||||
var lightboxVideo = GLightbox({
|
||||
selector: '.glightbox3'
|
||||
});
|
||||
lightboxVideo.on('slide_changed', ({ prev, current }) => {
|
||||
console.log('Prev slide', prev);
|
||||
console.log('Current slide', current);
|
||||
|
||||
const { slideIndex, slideNode, slideConfig, player } = current;
|
||||
|
||||
if (player) {
|
||||
if (!player.ready) {
|
||||
// If player is not ready
|
||||
player.on('ready', (event) => {
|
||||
// Do something when video is ready
|
||||
});
|
||||
}
|
||||
|
||||
player.on('play', (event) => {
|
||||
console.log('Started play');
|
||||
});
|
||||
|
||||
player.on('volumechange', (event) => {
|
||||
console.log('Volume change');
|
||||
});
|
||||
|
||||
player.on('ended', (event) => {
|
||||
console.log('Video ended');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var lightboxInlineIframe = GLightbox({
|
||||
selector: '.glightbox4'
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user