This is an example of using the AMD API proposal for formatting jQuery UI files as modules that express their dependencies.
This approach can be useful if you use an AMD-based loader like RequireJS, and you want to use different parts of jQuery UI on different pages or dynamically load parts of jQuery UI as part of the response to user actions.
This example dynamically loads the Datepicker jQuery UI widget with its French localization when the Date Picker tab is clicked.
This example also includes a RequireJS optimizer build profile to automatically combine jQuery UI scripts used in this page into one script to fetch. The Datepicker and its French localization is still loaded on demand after running the optimizer.
See the main.js file to see the app setup.