The "clickoutside" event
"clickoutside" is a custom Active CSS event which allows you to trap if someone has clicked outside of the target selector in the DOM tree.
To use this event, you need to activate it by using the clickoutside-event command. Once you have done this, the clickoutside event will work.
This was built initially for the purpose of knowing if the user has clicked outside of a form, but it can be used for other purposes such as closing up a menu when you click away from it.
Here is a simple example:
#myForm:clickoutside {
alert: "You clicked outside the form.";
}
This won't work on parent windows of inner iframe elements that have a clickoutside event. It did at one point, but for security considerations it was removed.