How can I check to see if a jQuery UI plugin is attached to an element? For example, if I load up the .sortable widget, how can its presence be determined?
The purpose behind this question is that I would like the ability to toggle .sortable on elements. With the ability to see that .sortable is present, I could then call .sortable(‘destroy’) to remove it.
All ui widgets attach their name as true to the element’s container data. jqueryui also adds a data filter expression.