updating moopop for mootools 1.2
June 23rd, 2008After several requests to update the script, I finally had time to make the update. In fact the script was under production for more than a month running over mootools SVN builds. The update also comes with a couple additions suggested by users, and also some optimizations thanks to the new mootools 1.2 element storage.
so… what’s new?
the basic improvement is that the code now works with mootools 1.2, be warned that this actually *breaks* compatibility with mootools 1.11 so please use the older version if you haven’t yet gone to 1.2
and then, what else?
resizable windows
I got some requests for this feature, so it’s here. Just mix a “r” parameter in this format: “[600,400,r]” and the popup window generated will be resizable.
ability to reuse the same popup
the old moopop had a bad habit of creating a new popup window for each link and not offering an option to reuse the same window. now you can use the “name” attribute native to <a> tags to specify the target of the popup.
defaulting to rel=”popup”
now you can just call moopop.captureByRel() without arguments and the script will default to the most common use case.
under the hood…
optimized code a bit, and now it’s using both element storage to avoid memory leaks and cleaner CSS2 selectors that got native in mootools 1.2
documentation?
yes sure, unless for the additions specified in this post, all documentation remains the same and you can get it either in the original post, or looking at the source of the uncompressed moopop 1.1
download
as with previous version, you just need Selectors and DomReady from the mootools core builder and the rest of the dependencies are automatically selected.
Download moopop 1.1 with documentation
or
Download minified version without docs to save bandwidth.

June 24th, 2008 at 7:51 am
thanks very much for this
June 25th, 2008 at 2:31 pm
[...] updating moopop for mootools 1.2 | a pint of javascript (and general web stuff) Okay - this isn’t exactly groundbreaking, but when you know you’ve got to do it, or have someone update them, why not make popups easy? (tags: mootools webdev popup _blank code dev example) [...]
July 9th, 2008 at 6:50 am
Hello
Great script
I want the scipt to function on all my links. Is there any way I can achieve this without writing rel=”popup” in every a href?