This is a personal experiment on using jquery-tmpl to create custom jquery-ui widgets and thanks to jquery-tmpl rending and updating code is much more cleaner and simple.
This example widget supports:
You can look the code on github