My problem can be a very simple thing, is that I'm new to script programming and I'm getting pretty much! I can not make this demo work in my .html file:
demo link in JSFidde: https://jsfiddle.net/h5q7pe3m/33/
I put the following in my .html:
<div id="allow-or-not" title="Show Again?">
<p>Would you like to show this dialog again?</p>
<button name="yes" class="ok allowed">Yes</button>
<button name="no" id="exit">No</button>
</div>
<script src="jquery.min.js"></script>
<script>
if (!localStorage.hideAlert) {
$(function() {
$("#allow-or-not").dialog();
});
} else {
$("#allow-or-not").css("display", "none");
}
$(".ok.allowed").on("click", function() {
$("#allow-or-not").dialog("close");
});
$("#exit").on("click", function() {
localStorage.setItem('hideAlert', true);
$("#allow-or-not").dialog("close");
});
</script>
Is there something missing?