I've got this code to display a different button once the other button has been clicked.
<a href="#" id="ac-button-top" class="btn btn-success add-to-cart">order</a>
<a href="#" id="ac-button-bottom" class="btn btn-success">test</a>
$('.add-to-cart').click(function() {
$('#ac-button-top').css("display", "none");
$('#ac-button-bottom').css("display", "block");
});
This works fine, however I need to save this click event somehow so even when the page is refreshed it still displays the second button and not the first one. My guess is you would do this using ajax but I'm a newbie to ajax and couldn't find any solution to this when I searched so if anybody could point me in the right direction of how to do this? Or any other way not using ajax?
localStorage.localStorage