May 2nd 2009 × our mootools largerBox modal lightbox: it makes you a better man!
largerBox has received a massive update! First of all, the function interface has changed! It now is no longer a snippet, it has been namespaced and organised:
var largerBox = {
version: function() {
return 2.1; // 17/05/2009 14:18:40
},
init: function(options) {
// by default it works on image links with the class 'fullImage'
// set other defaults.
var options = $merge({
selector: "a.fullImage", // can pass on any A object or array of objects, need to contain links to images.
styleBorder: "1px solid #000", // border style around image
useShadow: false, // apply a css shadow after image is drawn
useModal: true, // use a modal window (toggleModal function) or not
useTooltip: true, // uses element.tooltip prototype (needs it defined, set to false if not avail)
colourModal: "#555", // default colour for modal,
imageBackground: "#fff", // useful to have one for png or gif with transparency
zIndex: 1000000000 // default z-index for the enlarged images
}, options);
This post uses the following code to instigate the lightbox on the image above:
largerBox.init({
selector: "a.newimage",
useModal: true,
useShadow: true,
colourModal: "#fff"
});
The style and effect are somewhat different from our traditional style, visible on the image below:
Anyway, you can grab the latest dci_core library and search for the string largerBox. Dependent functions from dci_core are toggleModal and the element.tooltip prototype, both are optional though.



