Category Archives: javascript
Lazy Load Images with Prototype
Download lazyload.js. Requires prototype.js version 1.6.0_rc0 or above. Element.addMethods({ lazyload: function (element, options) { /** What does it do? It delays loading of images in (long) pages. Images below the fold (far down in the page) won’t be loaded before … Continue reading
Equal Height Columns
There are no CSS hacks that can get equal-sized columns, so I wrote this tiny bit of Javascript to do the work for you. Simply add a class of “column” to any <div>s and their heights will match when the … Continue reading
Smooth Scrolling Links
FAQs are tedious, but we can make their usage much more enjoyable (although I use this word lightly) by imroving the User Experience slightly. Normal FAQs jump from the list of questions to the answer; with a simple bit of … Continue reading
Regular Expression
It’s been a while since I last wrote anything on here — this blog has been abandoned since I went back to uni. — so I thought it best to show you a small part of the work I’ve been … Continue reading
More prototype
Earlier I wrote about prototype and script.aculo.us. I’ve been using it even more at work, and really, really like it. Who wants to write document.getElementById(“searchbox”); when you can write $(‘searchbox’);And Ajax; how could it be easier to make an Ajax … Continue reading
Prototype and script.aculo.us
The prototype javascript library is one of the most brilliant, time-saving tools a web developer can use. It’s so easy to use this in conjunction with script.aculo.us to create some user-friendly “drag-and-drog reordering elements with auto-save” to a page. I’ve … Continue reading