Download & Extend

close modalframe from parent window

Project:Modal Frame API
Version:6.x-1.7
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I'm using modalframe and automodal (which automatically creates modalframes from a css class on a link).
My request is more related to modalframes I believe.
I would like to close the modalframe, by just clicking on the area around the modalframe (in other words, by clicking on any spot outside the modalframe).

I googled "jquery and close dialogs" and found this piece of code:

$('.ui-widget-overlay').live('click', function() {
$(".dialogClass").dialog( "close" );
});

I tried to add this to ui.dialogs.js which didn't work, unfortunately.
How could I close modalframes by clicking outside them?

nobody click here