Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful.
You are using jQuery so you should post in the jQuery forum.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.