When using the CSS3 Background-size contain
and background center
in a div
how can I differentiate in JavaScript whether the div
or the actual image was clicked?
Please see the question in jsfiddle
EDIT
As indicated in the comment section, please notice that I'm sticking to this approach because the CSS3 styling of the div makes my life so easy because it properly aligns and centers the image in the div. Nevertheless, any other code that achieves the same result is welcome.