I can't give you a sure-fire formula for success, but I can give you a formula for failure: try to please everybody all the time.
Herbert Bayard Swope

Latest Tips

Opening only the top docking box

Wednesday, August 1st, 2007

This site makes extensive use of the clever Docking boxes (dbx) by Brothercake. Among the many setup options is the choice of default state – open or closed boxes – on the visitor’s first visit to a page. But I wanted something a bit different – the top box open and all others closed. The simplest way to achieve this is a tiny hack to the dbx.js file. Note that this file is compressed to reduce loading time (comments and whitespace removed), so edit with care, as follows:

Open the file with your favourite text editor and find “else if(!this.defopen”. A few characters further on look for “for(i=0; i<len; i++)”. Change that 0 to a 1 and you’re done!