OxyElements

Temporary Cookies Modal

Projects info
EXAMPLE:
Temporary Cookies Modal Demonstration
Press the "ACTIVATE MODAL" button to trigger the modal. When you press "Accept" in the modal, a temporary cookie will be stored, preventing the modal from appearing again in this tab. However, if you open the link in a new tab, the modal will show up again until you accept it once more.
Introduction:
The temporary cookies modal is perfect for displaying notifications, such as cookie alerts or any other messages that need to appear only once while the user is browsing. This modal will disappear upon acceptance but will reappear if the tab is closed and reopened. It’s a useful solution for notifications that need to be shown again under specific conditions without being intrusive.
Installation:
JSON Import to Oxygen Builder:
Import the following JSON code into Oxygen Builder to add the temporary cookies modal:
Refer to this guide for instructions on importing JSON into Oxygen Builder if needed.
Usage:
Once the element is loaded, locate the block named Temporary Cookies Modal.  Inside, you will find a pre-configured modal and a codeblock named Code Temporary Cookies.

Modal: You can simply take these elements out of the div called Code Temporary Cookies Modal and start using them. Alternatively, you can remove the pre-configured modal, add the class .oxy-modal-cookie to your own custom modal, and configure it as needed.
Customization:
  • Closing the Modal: You can use Oxygen Builder’s default class .oxy-close-modal to close the modal
  • Close Settings: The modal will also work correctly with other default closing settings, such as closing with the ESC key, setting a timer for automatic closure, or closing when clicking outside the modal. In all these cases, the modal will behave as if the .oxy-close-modal button was pressed.
Thanks for visiting my page
CLOSE
If any of my work works for you, you can help me continue generating content by making a donation from PayPal: Donate
If you want a special project or modify some of my projects you can send me the details of your project and budget by Messenger  (There is no low budget)