rlightbox2 icon indicating copy to clipboard operation
rlightbox2 copied to clipboard

How to remove (destroy) plugin dynamically?

Open ghost opened this issue 12 years ago • 2 comments

Is there a way of destroying instance of this plugin once its being loaded?

In source code there is destroy method, but when trying to reach it i got errors: $.ui.rlightbox.global.destroy(); --> $currentElement is undefined

Also when calling unbind on elements doesnt do the trick: $(this).unbind("."+"rlightbox").unbind("click").removeData("rlightbox");

I need this to simply reload/update the content of this plugin, since there is no API currently allowing for modification of its content once initialized.

ghost avatar Jun 25 '12 10:06 ghost

It should be resolved in the next version.

ryrych avatar Jul 01 '12 20:07 ryrych

while it is not resolved I did the next:

    if ($.ui.rlightbox.global.sets.a && $.ui.rlightbox.global.sets.a.length > 0){
        $.ui.rlightbox.global.sets = {};
    }

djest avatar Sep 05 '12 09:09 djest