Friday,
16th October 2009
Just a quick brain dump which may be useful to someone searching for the same thing I was. Enjoy.
function getStylesheet(url, callback) {
jQuery.get(url, function(data, status) {
if(status == "success") {
jQuery("head").append(
"<style type=\"text/css\">" +
data + "</style>");
}
callback(data, status);
});
};
Wednesday,
30th January 2008
From the front page of the jQuery web site:
You start with 10 lines of jQuery that would have been 20 lines of tedious DOM Javascript. By the time you are done it’s down to two or three lines and it couldn’t get any shorter unless it read your mind.
When did a single line of complicated code become a better thing than a readable ten line function?
By day, he works for ABC TV as a web developer. By night, he plays bass guitar in Look Who's Toxic. He also runs a little Unix Timestamp conversion site. There are plenty of other things he should be doing, but most of the time he's dreaming of what he'll do when he grows up while watching bad Star Trek spin-offs.