Use event.currentTarget. The event.target is supposed to be the img element since that is what the user has clicked on. The click then bubbles up through the image's containers. event.currentTarget gives you the element that the click handler was actually bound to.
(Or if you didn't bind this to some other object you could use this within the click handler and it should also be the current target.)
event.currentTarget
是添加事件句柄的元素event.target
是第一个接收事件的元素 向上冒泡到了 event.currentTarget 的元素, 由此元素添加的句柄进行处理所以当没有绑定this时, 就可以通过
event.currentTarget
得到添加事件句柄时的元素https://www.safaribooksonline.com/library/view/jquery-cookbook/9780596806941/ch08s09.html
http://stackoverflow.com/questions/33456789/event-target-should-be-anchor-but-is-image-instead