If you don't have access to the code adding the class, there is a jQuery plugin called livequerythat will allow you to run the code when elements are added to the DOM (or when you do things like adding a class to an element).
http://brandonaaron.net/code/livequery/docs
$('div.myClass').livequery(function() {
alert('myClass was added');
});
$('#someDiv').addClass("myClass");
This works specifically with jQuery methods.
source
share