Checking JQuery UI Calls

I am working on an old project from a former colleague. In this project, the entire jQuery UI 1.8.18 is loaded.

Is there an easy way to check what jQuery UI calls are made so that I can remove the unused parts?

+5
source share
1 answer

You can use jQuery.data("events") . If you know the class or selector identifier, use:

$(selector).data("events");

If you want to search the entire document, follow these steps:

$("*").each(function(index, el){
    if($(el).data("events") != undefined){
        //do something
    }
});

DEMO: http://jsfiddle.net/dirtyd77/SLGdE/3/

Hope this helps and let me know if you have any questions!

0
source

All Articles