A refactoring of the example given on CodeProject at http://www.codeproject.com/Tips/677434/How-to-Create-a-jQuery-UI-powered-Web-Page-that-Re