I have the following html structure
<div class='container'>
<div class='comment-row-id-1'> <span class='user'> job </span> <span class='icon-trash'> </span> </div>
<div class='comment-row-id-2'> <span class='user'> smith </span> <span class='icon-trash'> </span> </div>
<div class='comment-row-id-3'> <span class='user'> jane </span> <span class='icon-trash'> </span> </div>
</div>
What I'm trying to achieve is that when a user clicks on any gap with the "icon-trash" class, I don’t want to trigger an onclick response.
I can handle which gap has been pressed, but now I am stuck in the click itself, since it is not I cannot receive a warning message in this example
jQuery(".icon-trash").click(function(){
alert('hi')
})
source
share