I would expect the onAddClass event to occur only if the class is truly added (meaning: it wasn't there before -- I only want to be notified once, otherwise I'd just use onResize). The only way to work around this is to keep track of the last class name and only trigger my event listener if there was a change. I think the plugin should take care of that.
If it is too late to change this behavior, I would welcome an onChangeClass event that is only called once if jQuery addClass or removeClass executed, and it would pass the class name with a Boolean indicating the add or remove state.
onAddClass fires on every resize event even if the class has already been added:
...elsewhere...
I would expect the onAddClass event to occur only if the class is truly added (meaning: it wasn't there before -- I only want to be notified once, otherwise I'd just use onResize). The only way to work around this is to keep track of the last class name and only trigger my event listener if there was a change. I think the plugin should take care of that.
If it is too late to change this behavior, I would welcome an onChangeClass event that is only called once if jQuery addClass or removeClass executed, and it would pass the class name with a Boolean indicating the add or remove state.