Tagged: x
-
AuthorPosts
-
June 26, 2016 at 4:21 pm #1060406
ArtOfSpringParticipantHi 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
June 26, 2016 at 8:08 pm #1060680
RadModeratorHi 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.
June 27, 2016 at 6:19 am #1061302
ArtOfSpringParticipantThank 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
June 27, 2016 at 7:45 am #1061396
JoaoModeratorHi 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
June 27, 2016 at 11:13 am #1061743
ArtOfSpringParticipantPerfect!
Thanks
June 27, 2016 at 11:54 am #1061815
RahulModeratorYou are welcome!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1060406 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
