Tagged: iframe, pop-up, prettyphoto
-
AuthorPosts
-
April 18, 2018 at 9:27 pm #943766
Hi, I am currently testing the usage of pop-up functionality in order to offer an e-book subscription pop-up window on our start page https://kompetenz-check.ch, poping up after four seconds.
We so far managed to implement it along with some support tickets, thus using the following code on the child functions.php – however, the code does not display the forms full size so that the user will have to scroll down on the window. Also we are looking for a solution to have the background colour of the window changed in line with the start page colour, e.g. #6786a1. For your reference, you will find in the first footer column two E-Book related links (called “Bestellformular”, one was composed with an iframe tag, the other with a prettyPhoto tag. The latter one displays the form in its full size.Following is the code:
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
setTimeout(function(){ $(‘.popup_trigger’).trigger(‘click’) }, 4000);
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_script’);April 20, 2018 at 3:19 pm #944603Hey René,
Unfortunately you can’t change the background color of the iframe because of cors policies and they are also using !important; on the background color.
But you can reduce the scale of the form and increase the iframe to show the full form via css, Try this code in the General Styling > Quick CSS field:div.mfp-iframe-scaler,#_form_32_._form _form_32 _inline-form { height: 150vh !important; } iframe { -moz-transform: scale(0.70, 0.70); -webkit-transform: scale(0.70, 0.70); -o-transform: scale(0.70, 0.70); -ms-transform: scale(0.70, 0.70); transform: scale(0.70, 0.70); -moz-transform-origin: top left; -webkit-transform-origin: top left; -o-transform-origin: top left; -ms-transform-origin: top left; transform-origin: top left; }
Feel free to adjust to suit.
Best regards,
MikeApril 20, 2018 at 4:35 pm #944623Hi Mike, Great, works nicely. Thanks a lot!
Cheerio, RenéApril 20, 2018 at 6:07 pm #944674Hi,
I’m glad you got this corrected. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Adjust Pop-up frame size and colour’ is closed to new replies.