Use this sample widget starter code with ajax to create your new widget.