-
AuthorPosts
-
July 25, 2023 at 9:41 pm #1414417
Hi team!
Thank you for adding a cookie consent tool to the theme. I found it very useful. I just wanted to see if there was a way to “timeout” or auto accept upon scrolling ?
I do not have an EU website, but we do want to add this to our site. I set the basic one up, but did not see an option to “accept all upon scroll” or a way to add a timeout where the notice goes away after 10 seconds or so. Is there a way to do this?
Thanks!
July 25, 2023 at 9:44 pm #1414418Also on Chrome and Edge it looks really bad.
July 26, 2023 at 3:48 am #1414469Hi,
Thank you for the inquiry.
or auto accept upon scrolling ?
This option is not available by default, but we can add a script to hide the consent bar on scroll and auto accept the cookies. Please add the following code in the functions.php file.
function ava_custom_script_c() { ?> <script> (function($) { $(window).scroll(function (event) { var scroll = $(window).scrollTop(); if(scroll > 1500) { $('.avia-cookie-consent-wrap').fadeOut( "slow", function() { console.log('consent bar hidden'); }); $('.avia-cookie-consent-button-1').trigger('click'); } }); }(jQuery)); </script> <?php } add_action('wp_footer', 'ava_custom_script_c', 9999);
Best regards,
IsmaelJuly 26, 2023 at 5:31 pm #1414547Hi, will this also fix the formatting issue on Chrome and Edge? Those both do not show a bar at the bottom of the screen and instead edit the footer which looks very strange.
July 27, 2023 at 9:21 am #1414629Hi,
Thank you for the update.
Did you install a compression or cache plugin? Please disable the plugins temporarily, then toggle or temporarily disable the Enfold > Performance > File Compression settings to regenerate the scripts and stylesheets. Let us know if this helps.
Best regards,
IsmaelJuly 31, 2023 at 10:02 pm #1415094Hi, so the compression plugin was the issue. We disabled, cleared cache and it fixed it. We also go the code added as per instructed with our developer, but it does not seem to be working (even after updating and clearing cache)
Advice?
August 1, 2023 at 6:07 am #1415112Hi,
We get the following error whenever we access the site, which might be the reason why the script above is not working. To fix the issue, we adjusted the code a bit. Please try it again and make sure to purge the cache afterwards.
Uncaught ReferenceError: jQuery is not defined at (index):760:6
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.