This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Add a listener when a widget closes
#1
Hi,
is there a way to detect, via javascript, when a widget closes?

Thanks!
Reply
#2
Not directly, but as a work-around you can create a timer which checks widget state each second:
Code:
var widget = $('#widget-1'), visible = false;

setInterval(function() {
  var state = widget.is(':visible');
  if (state != visible) {
    visible = state;
    console.log('widget visibility state', visible);
  }
}, 1000);
Reply
#3
Than you, it works! Smile
Reply


Forum Jump: