• sorry – all now fail since upgrade

    DiviArea.hide(PopoverToClose);
    DiviArea.hide(‘#’+PopoverToClose);
    DiviArea.hide(‘#myPopover’);
    DiviArea.hide(‘myPopover’);

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter simonreading

    (@simonreading)

    Interestingly :
    DiviArea.hide(DiviArea.getArea(‘#’+PopoverToClose));
    works… !

    Its great for me (to find a fix) because I have only one worker function to close the popups – But a bit of a mouthful for those that need to do a big search and replace ??

    Hello @simonreading,

    Apologize for the inconvenience!

    Few errors were reported after the recent update. Our team has fixed those errors and the latest update is available for download. The previous release of our plugin (3.0.1) caused a PHP warning while WP_DEBUG was enabled; that warning could have caused the problems you experienced. So, if you update to the latest version (3.0.2+) then everything should work.

    Please get back to me, in-case of any query.

    Regards,
    Syed

    Plugin Contributor Philipp Stracker

    (@strackerphil-1)

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘3.0.1 DiviArea.hide(); no longer working’ is closed to new replies.