Reputation: 1409
As we all know jQuery scope contains the namespace for all jQuery plugins. Is there any way to list all jQuery loaded stuff in jQuery scope? The best example of my question is phpinfo() in PHP, it lists all loaded stuff of PHP.
Upvotes: 0
Views: 63
Reputation:
$.each(obj, function(key, value) {
console.log(key + ": " + value);
});
Upvotes: 1
Reputation: 135406
This should be okay
for (var plugin in $.fn) {
if ($.fn.hasOwnProperty(plugin)) {
console.log(plugin);
}
}
If es5 is supported, you can use
var plugins = Object.keys($.fn).sort().join(", ");
console.log(plugins);
I think this produces the nicest output
Upvotes: 1