• Resolved ZLC

    (@kindnessville)


    Hi Nabil,

    I have an evergreen timer set to display a message when it finishes. That part works wonderfully.

    I was wondering if it was possible to additionally hide some elements on the page with the timer when it finishes.

    Is there any script I can add to the page that could accomplish this?

    Thanks so much for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @kindnessville

    This code snippet should help:

    add_action('wp_footer', function(){
        ?>
    <script>
        (function($){
    
            $(document).on('hurryt:finished', '.hurrytimer-campaign', function(){
                $('.element-to-hide').hide();
            });
            
            })(jQuery);
    	</script>
        <?php
    });

    You can replace .element-to-hide with the element class or ID you want to hide.

    I hope this help.

    Let me know if you have any questions.

    Best,
    Nabil

    Thread Starter ZLC

    (@kindnessville)

    Thank you so much, Nabil. I’m assuming that I put this snippet in my functions.php

    I will try it and let you know if I have any other questions.

    I appreciate your help!

    • This reply was modified 3 years, 1 month ago by ZLC.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide elements when timer finishes’ is closed to new replies.