I would like to target the element clicked using $(this) however I need this code to be within a function like this:
function openQv(){
var lookImg = $(this).parent().find(".look-img").attr("src");
}
$(document).on('click touchstart', '.hotspot', function(e){
e.preventDefault();
openQv();
});
Using $(this)
within an external function doesn't seem to work, is there a way to do this?