Well, I got something like this:
HTML:
<div id="main" class="underline" >Hello</div>
JavaScript:
$('div').live('click', function(){
$(this).toggleClass("underline");
});
I have to run some function on event when div class was removed, and I haven’t got any permisions to edit functions that adding / removing class from div.
How can I catch that event when class is removing?
‘click’ event was used only as an example, so that class can be removen not only on the clicking
There is no such event. But you can do simpler:
DEMO: https://jsfiddle.net/VYukS/1/