• Resolved brandbrite

    (@brandbrite)


    Hi,
    I have a popup set with a button that links to a PDF. All PDF’s are set to open in new tab by default. When the button is clicked obviously a new tab is open but the popup is not closing. Is there a way to make the popup disappear after the button is clicked?

    • This topic was modified 4 years, 1 month ago by brandbrite.
Viewing 2 replies - 1 through 2 (of 2 total)
  • ausyed

    (@ausyed)

    Hello @brandbrite,

    Apologize for the inconvenience!

    You need Java script code to handle this. I would suggest the following code:

    <script>
    DiviArea.addAction(‘init_area’, function(area) {
    area.get(‘a[href^=”#”]’).click(function() {
    DiviArea.hide(area);
    return true;
    });
    });
    </script>

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

    Regards,
    Syed

    Thread Starter brandbrite

    (@brandbrite)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Open link in new window and close popup’ is closed to new replies.