VenoBox icon indicating copy to clipboard operation
VenoBox copied to clipboard

No "destroy" Method?

Open sayontan opened this issue 3 years ago • 1 comments

The documentation says:

venobox.destroy(); // Destroy the plugin

However, there is no such method in the script. Is there a way to unbind an existing instance or reset its contents? I would like to add new images to an existing gallery dynamically.

sayontan avatar Apr 09 '22 06:04 sayontan

For now I have a workaround - I am reinitializing the lightbox with the same selector, and that seems to be taking care of the issue.

sayontan avatar Apr 09 '22 16:04 sayontan

Yes, if you reinitialize the same selectors after adding new element to the collection, the script skips the already initialized elements. Sorry, the destroy() function was inside the old jquery version, I forgot to remove it from the documentation.

nicolafranchini avatar Nov 19 '23 00:11 nicolafranchini