• Resolved pwsean

    (@pwsean)


    Hi. I have an animation on my website that is being obscured by the cookie consent bar. Is it possible to delay the cookie bar by a second or so?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @pwsean,

    We currently do not have any option to set a delayed load for the cookie bar.

    Thread Starter pwsean

    (@pwsean)

    Ok no problem. It’s a very easy thing to do via setTimeout – can I custom code it myself? Just not sure how to implement it via your plugin.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @pwsean,

    Please copy below code snippet to your theme’s CSS file.

    function wt_cli_delay_cookie_bar()
    {
    
        ?>
        <script>
            var barTimeOut = 3000;
            setTimeout(function(){
                jQuery( "#cookie-law-info-bar" ).animate({ opacity: 1 }, 500);
            },barTimeOut)
        </script>
        <style>
            
            #cookie-law-info-bar
            {
                opacity:0;
            }
        </style>
        <?
    }
    add_action('wp_footer','wt_cli_delay_cookie_bar');

    Leave us a review, If you like the plugin and support. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Delay initial display?’ is closed to new replies.