The previous answer doesn't work in either capacity unless you use .currentTarget instead of .target as the event listener is what triggered the event