See this link: https://css-tricks.com/the-thinking-behind-simplifying-event-handlers/