Update events JavaScript.