Added a working example on jsfiddle.net