rlightbox2
rlightbox2 copied to clipboard
How to remove (destroy) plugin dynamically?
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.
It should be resolved in the next version.
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 = {};
}