fix jQuery usage bugs ...

... simplify html and reformat code