JSFiddle - React, Tailwind, and code Playground
by john_s
HTML
<script src="https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js"></script>
<div id="dialog-modal" title="Please Note:" class="content-list" style="display: none;">
<p>If you are taking advantage of our 21 day risk free trial <strong>your credit card will not be charged for 21 days</strong> after you receive your new biofeedback headband.</p>
<ul>
<li>Only Available for residents of the USA</li>
<li>No Risk - 100% Money-Back Guarantee</li>
<li>If you’re not satisfied we even pay for your return shipping</li>
</ul>
</div>
<button type="button" id="clearCookie" style="display: none;">Clear Cookie</button>
JavaScript
$(function () {
if (!$.cookie("notice-accepted")) {
$("#dialog-modal").dialog({
height: 380,
width: 500,
modal: true,
buttons: {
Ok: function () {
$.cookie("notice-accepted", 1, { expires : 30 });
$(this).dialog("close");
}
}
});
} else {
$('#clearCookie').show();
}
$('#clearCookie').click(function() {
$.removeCookie("notice-accepted");
});
});