Get Parent ID Name

Using the information using here by MarkHunte I was able to get the parent ID:

BUT just only by assigning the function with hype "On Mouse Click" function:
https://cl.ly/381y21130E2k/Screen-Shot-2018-02-21-at-8.29.56-PM.png

While not a big deal, Im wondering if there is way to make it work using the .on('click touchstart', function()