JSFiddle - React, Tailwind, and code Playground
HTML
<div id="log1">
<form id="loginform">
Uname:
<input type="text" id="uame" name="uname">
Pwd:
<input type="password" id="pwd" name="pwd">
<div class="Button1">
<button type="button" id="sbut1" value="Login" class="btn" >
Submit
</button>
<button type="reset" id="reset" value="Reset" class="btn">
Clear All
</button>
</div>
</form>
</div>
<div class="cont1" style="display:none">
Hi Every one
</div>
JavaScript
$('#sbut1').click(function() {
$('.cont1').show();
$('#log1').hide();
localStorage['shown'] = '.cont1';
});
$(function() {
var sel;
if (sel = localStorage['shown']) {
$('.cont1, #log1').hide().filter(sel).show();
}
});