Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

142
Vistas
How to add settings to lightGallery

Im using lightGallery to open a lightbox of images using the solution below, which was found here: https://stackoverflow.com/a/54764289/1390648

Where can I add the settings from the lightGallery docs to the code below to control the mode, speed, and other settings?

Each time I try to add them in, it breaks the lightGallery from opening.

function initLightGallery() {
    lightGallery(document.getElementById('lightgallery'));
    $("#magic_start").on("click", () => {
        $("#lightgallery :first-child > img").trigger("click");
    });
}
initLightGallery();
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Replace your second line

lightGallery(document.getElementById('lightgallery'));

by

lightGallery(document.getElementById('lightgallery'), {
    speed: 500,
    mode: 'fade',
    ...Other settings
});

It is right there in the docs...

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda