📣Postmark has been acquired by ActiveCampaign
x

Modalbox 1.6.0

A long awaited update of the Modalbox library has been released. It has got 1.6.0 as a version number, as it includes support for the latest Prototype (1.6.0) and Script.aculo.us (1.8.0) libraries, as well as lots of other improvements.

First of all I would like to thank all Modalbox community members for helping me to support it. It's really exciting having so much feedback from all of you! Now let's move to the updates included into 1.6.0.

This release has lots of bugfixes as well as a few really neat new features. I'd like to point out two new methods: resizeToContent and resizeToInclude.

resizeToInclude(element [, options]) method allows you to increase Modalbox height by a given element's height. element might be an ID of an element or a reference to a DOM element.

resizeToContent([options]) method adjusts Modalbox height to fit actual content. For example, imagine you performed some modifications of the loaded content via JavaScript (i.e., removed some node) and you want to reduce Modalbox height appropriately — just call this method to do the trick.

You can see a usage example on the Modalbox page.

The code was also heavily refactored keeping in mind the latest Prototype 1.6.0 additions, so there are no deprecated methods being used. As you might already know, Prototype 1.6.0 includes the DOM builder implementation, so, starting from 1.6.0 Modalbox doesn't rely on builder.js from script.aculo.us library anymore. It means, Modalbox became more lightweight and only requires effects.js from the script.aculo.us package.

Also added is a better support of Internet Explorer 7, which means that the page will not be scrolled on top, and select elements will not be hidden anymore for that browser. IE6 still has these points to improve though, which I'm planning to implement in the upcoming releases.

One more useful addition is beforeHide callback (instead of onHide) which fires right before the hiding sequence. It might be useful to retrieve form values before closing the Modalbox window.

For more details see the change log.