Opening only the top docking box

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!

Comments are closed.