Search Results

JavaScript namespaces

Based on the Prototype namespacing made easy, except this doesn’t require Prototype. String.prototype.namespace = function(separator) {     var ns = this.split(separator || ‘.’), p = window;     for (i = 0; i < ns.length; i++) {         p = p[ns[i]] = p[ns[i]] || {};     } }; This isn’t so much to ditch Prototype, but to […]

Poor man’s JavaScript Behaviours

JavaScript behaviours are roughly defined as an event handler that is set once, then handled by elements that are created on the fly later on. For example, if I have a list of links referencing images which are loaded inline, adding an removing the links from this list would not require me to re-hook the event […]

Fixing IE overflow problem

Until recently, I didn’t know IE (both 6 and 7) had an overflow problem. But it does. I found it on my personal blog, and my pet project: jQuery for Designers - it’s particular visible because I use a lot of code examples. Here’s a detailed account of the problem, and it’s fix.