Add single onClick function instead of 3 event listeners