Could someone point me any jquery function or plugin to control popups?
I need to close a login form (popup) if the user forget it opened (after timeout without user activity)
That is what I tried: (javascript only)
- var popup , last_history = 0 ;
- function open_my_popup(url) {
- popup = window.open(url, 'my_popup', '');
- setTimeout("clock()", 5000);
- }
- function clock(){
- if( popup.history.length; > last_history ){
- last_history = popup.history.length;
- setTimeout("clock()", 10000);
- } else popup.close();
- }
- open_my_popup( "http://jquery.com" );
But it let me get the error
"permission denied to read window.history.lenght" Is there any jQuery alternative?