Reputation: 17587
I know I can check if jQuery UI core is loaded with jQuery.ui
, but how to check if a widget (draggable
) is loaded, I am using typeof($('something').draggable) == 'function'
, is any better way to do this?
Upvotes: 6
Views: 4329
Reputation: 990
You can try like this:
if (typeof(jQuery.ui.draggable) != 'undefined'){
// UI draggable is loaded
}
Upvotes: 8