$("#divid1").click(function(){
$("#divid1").hide(); //this should remain hidden even after refreshing the page
$("#hideid1").hide(); //this should remain hidden even after refreshing the page
$("#id1").show(); //this should remain visible even after refreshing the page
});
.hide{
display:none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<img src="/img/done.png" id="divid1" alt="divid1"/>
<img src="/img/schedule.png" height="12" width="12" id="hideid1" alt="hideid1" />
<div id="id1" class="hide"><img src="/img/done.png" height="12" width="12" alt="id1" /></div>
My goal is to display an image after the page loads, and when clicking on it, show a new image while hiding the old one. However, this setup resets upon refreshing the page.
I would greatly appreciate a solution to maintain the desired behavior even after page refresh.
An implementation using my specific IDs would be most helpful! Thank you!