Hi team!
I am looking for some help to create a snippet of JS code that will do the following:
-
Set a cookie named ‘AUTHENTICATED’ when user visits specific page on the website.
-
The AUTHENTICATED cookie should be available across the website, not just on the page they got it.
-
The AUTHENTICATED cookie must expire at end of the session.
-
Change .private-nav class to 'display: block’ if user has the AUTHENTICATED cookie.
-
Change .private-nav class to 'display: none’ if user does not have the AUTHENTICATED cookie.
I have tried so so many things to get this to work - any help would be amazing!