I append <a>
tag to my div
:
$('<a class="dz-jcrop" href="http://www.google.com" >google</a>').appendTo('.dz-image-preview');
I want to stop propagation for <a>
tag .. but when I try just to select the element I can't. I use the following code to log to test if my element is selected :
$(document).on('click', '.dz-jcrop', function(){
console.log('me');
});
It doesn't get logged and the element is not selected. How to stop propagation to appended element?