I have some external JS code which I don't want to modify. In multiple functions, this JS has the code to add and remove a particular class from a particular jquery element. For example:
$mck_no_messages.removeClass('vis').addClass('n-vis');
$mck_no_messages.removeClass('n-vis').addClass('vis');
I want to do some action once 'vis' class is added or removed from $mck_no_messages. One way is to implement that logic at all places where the external code is removing/adding the above class but I don't want to do that as in future they might add this condition at some more places.
how can I add some event/handler to this?