I'm trying to make a button that will disappear after being clicked. I've gotten it to work on another site(not oxwall powered), but cannot get it working on oxwall. Can anyone help me out? I'd really appreciate it. Heres the code below:-
<script>$(document).ready(function () { $("button").click(function handleClick() { { $(this).off('click'); alert('You have received your daily gift. Come back again tomorrow to get another. Merry Christmas!');} var $this = $(this); if ($this.is(".gift-1")) { $.cookie("button1", 1, { expires: 1 }); $this.prop("disabled", true); } else { $.cookie("button2", 1, { expires: 1 }); $this.hide(); } });
if ($.cookie("button1")) { $(".gift-1").prop("disabled", true); } if ($.cookie("button2")) { $(".gift-2").hide(); }});</script>