Added switch-case statement to JS file, events to html file