Knockout-jQueryUI can be installed either by using bower, or by downloading one of the github-hosted releases. The bower package name is knockout-jqueryui:
The library has separate builds for referencing it in a script tag and for using its binding handlers as AMD modules.
Include the script after jQuery, jQuery UI and Knockout:
The binding handlers are separate AMD modules which only depend on the related jQuery UI widgets. The simplest case is when jQuery UI is also modularized. As of jQuery UI 1.11, all of the library's source files are AMD modules. You can also modularize the earlier versions using the https://github.com/jrburke/jqueryui-amd tool.
Now arrange the files into a similar directory structure:
├── index.html ├── app │ ├── main.js │ └── viewModel.js └── lib ├── jquery │ └── jquery.min.js ├── jquery-ui │ ├── accordion.js │ ├── autocomplete.js │ ├── ... │ └── tooltip.js ├── knockout │ └── knockout-3.1.0.js ├── knockout-jqueryui │ ├── accordion.js │ ├── autocomplete.js │ ├── ... │ └── tooltip.js └── requirejs └── require.js
Your index.html should look like this:
You have to configure RequireJS and bootstrap your application in app/main.js:
Now you can require the individual bindings in the view model's module. The bindings declare dependencies to the appropriate jQuery UI modules, you don't need to explicitly require them.
There is an example setup in the project's github repository.