Is it possible to listen to a "style change" event?
<p>Is it possible to create an event listener in jQuery that can be bound to any style changes? For example, if I want to "do" something when an element changes dimensions, or any other changes in the style attribute I could do:</p>

<pre><code>$('div').bind('style', function() {
    console.log($(this).css('height'));
});

$('div').height(100); // yields '100'
</code></pre>

<p>It would be really useful.</p>

<p>Any ideas?</p>

<p><strong>UPDATE</strong></p>

<p>Sorry for answering this myself, but I wrote a neat solution that might fit someone else:</p>

<pre><code>(function() {
    var ev = new $.Event('style'),
        orig = $.fn.css;
    $.fn.css = function() {
        orig.apply(this, arguments);
        $(this).trigger(ev);
    }
})();
</code></pre>

<p>This will temporary override the internal prototype.css method and the redefine it with a trigger at the end. So it works like this:</p>

<pre><code>$('p').bind('style', function(e) {
    console.log( $(this).attr('style') );
});

$('p').width(100);
$('p').css('color','red');
</code></pre>
