Hi. I am working on simple Asp.Net MVC commenting system with like/dislike options for comments. I want to implement that user can only click once like or dislike button for specific comment.
I'm new in programming. By now, i only can disable clicked buttons, but that is not good solution, because when page refresh, buttons are enabled again.
<input id="like" class ="vote" type="button" value="Like" />
<input id="dislike" class="vote" type="button" value="Dislike" />
$(".vote").click(function () {
$(this).attr('disabled', 'disabled');
alert("Thanks");
});
How to keep them disabled for a certain period of time? Is it possible do this using cookies, or something else. I would appreciate any kind of help.