nicolafranchini/VenoBox

Re-initialize

Luckyfella73 opened this issue · 1 comments

Hello,

I had to add a content-blocker (Borlabs) because of GDPR reasons for Youtube embeds.
The content-blockers removes the HTML needed for Venobox (including the trigger class (.venobox)
and after consent the HTML is pushed back into the DOM.

I guess on page-load the Venobox script looks for the trigger class and if not found nothing happens of course.
Pushing new content to the DOM is not recognized by Venobox and that's why the Venobox script doesn't fire anymore.

So my question is:

Is it possible to re-initialize the Venobox script? And if yes - how can I do that?

have you tried to call it again after the DOM is updated?

new VenoBox({
    selector: '.my-custom-links',
});