Skip to content

disable shideshow #401

Closed Answered by gingerchew
zonky2 asked this question in Q&A
Jan 27, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

With a small amount of JS and some CSS it's easy to add, but there is already this rule in the css.

.glightbox-button-hidden {
    display: none;
}

You can also add an attribute to the container and make it more dynamic.

[data-slides="1"] .gbtn {
    display: none;
}
lightbox.on('open', () => {
    const container = document.querySelector('.glightbox-container');
    container.dataset.slides = container.querySelectorAll('.gslide').length;
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zonky2
Comment options

Answer selected by gingerchew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #400 on January 27, 2023 16:48.