Home Forums Popup Fire Custom close button

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5228
    Avatardavehardyuk
    Participant

    I need to add in a custom close link/button within my custom html content that will close the popup, is this possible?

    Thanks,

    Dave

    #5229
    AvatarCharlie
    Keymaster

    Hello Dave,

    Welcome to the community :)

    Technically this is possible but you will need to add extra CSS and Javascript code into your theme’s files and functions.php.

    Here is the javascript we use to close a Popup.

    // Close Popup
    
    $('.wps-pf-close').click(function() {
        $('.wps-pf-container').bPopup().close();
        $('.wps-pf-video-container iframe').attr('src', $('iframe').attr('src'));
    });

    You will have to modify this code to trigger based off the custom html you add into the popup.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.