As usual my life is mostly taken up with work. Which always makes me feel less like working on code at home, despite (as usual) having started a number of projects off. At least I've got everything in subversion now, so I can at least make changes every now and then just so I can check stuff in and have it feel like some progress has been made.
July had a few highlights: there was Canada Day. That was good (entertaining, plus there was the day off work). I spent an afternoon down at White Rock Beach (took a photograph or two). The HSBC Celebration of Light, which meant two nights of fireworks (with two more to come, photos of the first night are ready to sort for upload). Work wise we moved office to downtown, which is a rather great move (should save me nearly 5 hours a week of time getting to/from work).
Back to code I've got some snippets that I really need to pull from my library at work, because they've proven to be very useful. The following is one such snippet (requires prototype, at least prototype.lite.js, as used by moo.fx):
Element.prototype.getByTagName = function(tagName) {
childNode = new Array();
childNode[0] = null;
i = 0;
$c(this.childNodes).each(function(child){
if(child.nodeName == tagName) {
childNode[i] = child;
i++;
}
});
return childNode;
}
It can come in very handy (mainly because it doesn't traverse down) for some scripts. You could use it, for example: $('someTableRow').getByTagName('td').each(function(a){ ... }); to get each table cell.
