Categories

jQuery.debug.sortPlugins()

Categories: Debug

jQuery.debug.sortPlugins( [ plugins ], function(list) )

Plugin: jQuery.debug.sortPlugins

Description: Debug order of plugins.

  • jQuery.debug.sortPlugins( [ plugins ], function(list) )

    version added: 1.0

    plugins   A plugin name or an array of plugin names that define requirements.

    function(list)   A handler to execute after all required plugins are ready. Receives the sorted plugin list as argument.

The jQuery.debug.sortPlugins() is a debugging tool to get a list of already loaded plugins, additionally we can add some plugins with the plugins argumnet.

The list is sorted in the order in which the plugins depend on each other.

  • Get a list of loaded plugins.

    Code:
    jQuery.debug.sortPlugins( ['jQuery.base64', 'jQuery.tmpl'], function( list ){
        alert( list.join(', ') );
    });
    Results:
    jQuery.json, jQuery.base64, jQuery.tmpl