Updated 2012-12-26 with a much better algorithm for detecting stylesheet loading.
So let's say I want to create elements that match a jQuery UI theme (in my case, I was using a <canvas> element and wanted to copy colors). I could try to parse the CSS file directly, but that runs afoul of the same-origin security problem (I use Google's CDN to get the jQuery UI stylesheets, as in
var background = $('<div class="ui-state-default">').css('background-color');
Continue reading ‘Copying jQuery UI styles and Detecting CSS Loading’ »