Privacy policy statement pop-up

I’ve tried to implement the code as described in the post, but it’s not working yet. Maybe I haven’t named the classes correctly?

My project

I named the complete message div - popup and the button popup-close

The custom code I used:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
    if(localStorage.getItem('popupState') != 'shown'){
        $(".popup").delay(2000).fadeIn();
        localStorage.setItem('popupState','shown')
    }

    $(".popup-close").click(function(){ // You are clicking the close button
        $('.popup').fadeOut(); // Now the popup is hidden.
    });
});
</script>

CC. @aaronocampo @LuckyScooby

Thanks for looking into this