Jel. PopupBuilder

Unobtrusively adds popup window behaviour to an array of specified DOM elements (links).

Summary
Unobtrusively adds popup window behaviour to an array of specified DOM elements (links).
The class constructor, where all work for this class is done

Functions

constructor

constructor: function(elements,
windowName,
options)

The class constructor, where all work for this class is done

Parameters

elementsArray, the elements to add popup window behaviour to, when clicked.  These should each be links with an href attribute
windowNameString, the window name to load the popup into, as in the standard window.open javascript function
optionsString, the options string for the popup window, as in the standard window.open javascript function.  Also allows you to specify top=c, and left=c to center the window vertically and horizontally respectively

Examples

new Jel.PopupBuilder($$("a.popup"), "popup", "width=640,height=480,top=c,left=c");
// All links of class popup will now open their hrefs in a 640 x 480 window centered on the screen
constructor: function(elements,
windowName,
options)
The class constructor, where all work for this class is done