Check if jQuery plugin has been applied to element

In jQuery, how can I check if a specific plugin is active on an element? Alternatively, can I get a list of elements to which a particular plugin has been applied?

I do not control the plugin code. I tried to check a property like

$("#example").fancybox

but this property exists for each element, regardless of whether the plugin has been applied.

Thank!

+5
source share
1 answer

A plugin is not required to advertise the outside world by the fact that it has added an element.

( , jQuery UI factory) , jQuery data(). , .

+4

All Articles