assets/js/script.js
/**
     * @desc Initialize the gallery with dynamic addition of images
     * @param {object} itemsToInit - jQuery object
     * @param {string} addClass - additional gallery class
     */
@desc Initialize the gallery with dynamic addition of images
@param {object} itemsToInit - jQuery object
@param {string} addClass - additional gallery class
@desc Initialize the gallery with dynamic addition of images @param { object } itemsToInit - jQuery object @param { string } addClass - additional gallery class
function initDynamicLightGallery(itemsToInit, addClass) {
      if (!isNoviBuilder) {
        $(itemsToInit).on("click", function () {
          $(itemsToInit).lightGallery({
            thumbnail: $(itemsToInit).attr("data-lg-thumbnail") !== "false",
            selector: "[data-lightgallery='item']",
            autoplay: $(itemsToInit).attr("data-lg-autoplay") === "true",
            pause:
              parseInt($(itemsToInit).attr("data-lg-autoplay-delay")) || 5000,
            addClass: addClass,
            mode: $(itemsToInit).attr("data-lg-animation") || "lg-slide",
            loop: $(itemsToInit).attr("data-lg-loop") !== "false",
            dynamic: true,
            dynamicEl:
              JSON.parse($(itemsToInit).attr("data-lg-dynamic-elements")) || [],
          });
        });
      }
    }
function initDynamicLightGallery ( itemsToInit , addClass ) { if ( ! isNoviBuilder ) { $ ( itemsToInit ) . on ( "click" , function ( ) { $ ( itemsToInit ) . lightGallery ( { thumbnail : $ ( itemsToInit ) . attr ( "data-lg-thumbnail" ) !== "false" , selector : "[data-lightgallery='item']" , autoplay : $ ( itemsToInit ) . attr ( "data-lg-autoplay" ) === "true" , pause : parseInt ( $ ( itemsToInit ) . attr ( "data-lg-autoplay-delay" ) ) || 5000 , addClass : addClass , mode : $ ( itemsToInit ) . attr ( "data-lg-animation" ) || "lg-slide" , loop : $ ( itemsToInit ) . attr ( "data-lg-loop" ) !== "false" , dynamic : true , dynamicEl : JSON . parse ( $ ( itemsToInit ) . attr ( "data-lg-dynamic-elements" ) ) || [ ] , } ) ; } ) ; } }
@desc Initialize the gallery with dynamic addition of images
 @param {object} itemsToInit - jQuery object
 @param {string} addClass - additional gallery class
@desc Initialize the gallery with dynamic addition of images @param { object } itemsToInit - jQuery object @param { string } addClass - additional gallery class