Add fixes for js

- unify the event handlers to `.on()`
- remove white space
- use `===`  operator instead  `==`