Called when popup is maximized or minimized.
onToggle = function(event)
This event is emitted in addition to onMax or onMin and can be used for resizing of the content inside the popup, for example resizing a grid or a layout. Please note that you will need to user event.onComplete to trigger the resize when transition is complete.
You can add event listener during the object creation: w2popup.open({ title : 'Title', body : 'Body', onToggle : function (event) { event.onComplete = function () { w2ui.grid.resize(); } } }); or after popup is opened: w2popup.on('toggle', function(event) { console.log('event: ' + event.type, event); }); The event handler is called before the default action of the event is triggered. You can cancel the default action by calling event.preventDefault(). To perform an action after the event is fully processed, define event.onComplete function.
See events page in utilities for more details.