Merged spiritdead's solution in

added the control in the Demo