I am using jquery on a contenteditable div, I have an element in this div which has a certain class, I want to check if the user is about to delete that element from the div, and then delete an element with a matching class.
it will be like this
<span class='deletable-1'></span> wew ewe w ew <span class='deletable-1'></span>
I want to check when the user is about to delete deletable-1
and delete the matching span,
How can I do this using jQuery ?