1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| <body>
<div id="dialog">
<div>
<p>.....</p>
<a class="....." href="index.html">
<span>........</span>
</a>
</div>
</div>
<script src="_js/jquery-3.2.1.min.js"></script>
<script src="_js/bootstrap.bundle.min.js"></script
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script>
$(document).ready(function() {
// Make sure dialog is initially hidden:
$('#dialog').dialog({autoOpen: false});
// Check for the "whenToShowDialog" cookie, if not found then show the dialog and save the cookie.
// The cookie will expire and every 7 days and the dialog will show again.
if ($.cookie('whenToShowDialog') == null) {
// Create expiring cookie, 7 days from now:
$.cookie('whenToShowDialog', 'yes', { expires: 6, path: '/' });
// Show dialog
$('#dialog').dialog("open");
}
});
</script>
</body> |
Partager