Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1060406
    ArtOfSpring
    Participant

    Hi there,

    I tried to implement an age verification on the site: http://stage3.art-of-spring.marketing/
    Therefore I used a blank template but I can’t figure out how to create a button that closes the popup.

    Basically the “Ja” button should work like the closing image on the top right corner of the modal popup.
    Could you please assist?

    Thank you

    #1060680
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    1. Please add this code to Admin > Appearance > Customizer > Custom > Javascript

    jQuery ( function( $ ) {
    
    $('.x-btn.close-it').on('click', function() {
    
    $('.cp-image-close .cp-default-close, .cp-image-close').trigger('click');
    
    } );
    
    } );

    2. Add close-it to your Ja button’s class input/attribute.

    Hope this helps.

    #1061302
    ArtOfSpring
    Participant

    Thank you for your reply!

    It works as long as I also keep the “Close Link” “Type: Image” selected (in the modal settings)
    When I chose “Type: Do not close” the button “Ja” loses it’s fuction.

    How can I achive that only the “Ja” button will close the modal?

    Thank you

    #1061396
    Joao
    Moderator

    Hi There,

    To Hide the closing button please add the following code to Appereance Customizer Custom CSS

    .cp-overlay-close img {
    
    display: none;
    
    }

    Hope that helps,

    Joao

    #1061743
    ArtOfSpring
    Participant

    Perfect!

    Thanks

    #1061815
    Rahul
    Moderator

    You are welcome!

  • <script> jQuery(function($){ $("#no-reply-1060406 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>