# Alert
Alerts can be created with <section class="section--alert hidden" id="alert--12345" data-stc-alert-expiration="365"></section> markup. They can be shown or hidden by default with the addition or omission of the hidden class on the <section> tag. The alert must also contain a unique id attribute starting with a keyword alert.
Before the alert is shown, the scripts check if there exists a cookie with the name stc-alert--12345, if it does then it adds a class hidden to the container & hides it. Otherwise it adds on that class, effectively hiding the alert.
Once the alert close button is triggered a cookie is set with the name stc- + id of the alert section. The expiration date of the cookie can also be set via data-stc-alert-expiration="1" attribute on the <section> tag. The time is set in days, decimal values can also be used.
If no attribute is provided the cookie will expire at the end of the session.
The cookie is being set for the domain name savethechildren.org, so it would work across all subdomains, tests in the dev site will fail due to this reason.