Hey @simonreading
I just want to quickly follow up here: I’ve tested the .hide()
method, and on all our sites it’s working as expected.
As @ausyed mentioned, there was a bug in the previous release that has been addressed; however, it’s unlikely that it caused a problem with that JS API function – so, in case you still experience issues after updating to 3.0.2, I’d love to have a look at a (demo) page with the Popup to see what’s really happening.
In version 3.0.2, you should be able to close a Popup using any of the following:
// Global function:
var popupId = 'my-popup';
DiviArea.hide(popupId);
DiviArea.hide('my-popup');
DiviArea.hide('#my-popup');
var area = DiviArea.getArea('my-popup');
DiviArae.hide(area);
/*
Note:
The .getArea() method takes the same arguments as .hide():
getArea('my-popup') === getArea('#my-popup') === getArea(popupId)
*/
// New in 3.0 - OOP way to hide a Popup
var area = DiviArea.getArea('my-popup');
area.hide();
Thanks, and happy Popup-ing ?? Philipp