I'm having difficulty understanding how to use event.data to return the value of whatever element the event fired one. Here my example:
<a href="#" class="dw_add">
<img src="http://something" />
</a>
var callback = function(event){ console.log(event.data.src) }
$('.dw_add')
.on('click', { src: $(this).find('img').attr('src') },callback);
$this is currently referencing the document and not the that was clicked. Hopefully you can see what I'm trying to do, but my javascript knowledge is limited, think I'm approaching it in a PHP mindset.
Any ideas how to pass the value of 'img src' to the callback?