convert to plugin and create demo

convert javascript file to jquery plugin and created a demo html page