The jQuery library is crazily popular, and for good reason. When used properly, it can speed up the development process and give us reliable ways of doing things that would otherwise take a lot of coding effort.
A complement to jQuery is jQuery UI, which is a set of widgets, themes, and animation effects. With jQuery UI, you can quickly create drag and drop components, sortable lists, and lots of other useful UI niceties.
This recipe will walk you through creating a jQuery UI-sortable widget inside a Meteor template.
For this recipe, we will definitely want client and server folders to keep the code clean and readable. To accomplish this, we will rely on our default template scaffolding. Please create a new project called swatches
using the Setting up your project file structure recipe in Chapter 1, Optimizing Your Workflow, as your starting file structure.
Once you've completed the scaffolding, we will need to add the randomcolor
package to our project....