Tagged: Modal window button position
Dear Mike,
I have a problem with the cookie modal window button-position on mobile. Would it be possible to place all buttons above the window-content instead below, so that the user don’t need to scroll down to the buttons? A lot of users don’t figure out how to scroll down to accept or decline the message.
Thanks for any help.
Hey dondela,
Thanks, I added this to your child theme function.php
function move_cookie_consent_modal_buttons() { ?>
<script>
var copyDiv = document.querySelector('#av-consent-extra-info .avia-cookie-consent-modal-buttons-wrap');
var appendtoDiv = document.querySelector("#av-consent-extra-info .av-special-heading");
if (!!copyDiv) {
var clone = copyDiv.cloneNode(true);
copyDiv.style.paddingTop = '25px';
appendtoDiv.appendChild(copyDiv);
}
</script>
<?php
}
add_action( 'wp_footer', 'move_cookie_consent_modal_buttons', 99 );
Please check.
Best regards,
Mike
Hi Mike,
awesome, thank you so much!
Best support ever.
Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike