Fix coding style
Update level and value on change
Use jQuery instead