how write Stateful Plugins with UI Widget Factory in jquery.




with a sample UI widget plugin sample: