jquerytools/jquerytools — pull request #1030 by smarden1 (2013-08-17 20:55:22+00:00)
Title: Dev - allow closeOnClick and closeOnEsc to be toggled after the overlay has been instantiated

There are a few different ideas conflating in this patch, but the general idea is to add some more programability to overlays. The following changes have been made...

1. Exposed closeOnClick and closeOnEsc methods that allow you to change this option once an overlay is constructed. For example, you can now create an overlay that can be closed, and then if conditions change, you can disable that ability. This was previously very difficult to do. This also means that the eventhandler is added to all overlays and is toggled by the values of the closeOnClick and closeOnEsc variables.

2. Since overlays are singletons, I've added the overlays function which will return all overlay that have been instantiated. I've also changed the uid function to use an incrementing counter instead of a random number.

3. Added a simple function which will return a boolean indicating whether or not an element has an overlay attached to it. This is just a convenience method.