is there a way, that JQuery remembers the settings after the page was refreshed. Example if I click the button, the color turns blue and the text which is in the table get hidden (this works perfectly) But after I fresh the page it turned back to red and text is showing again => expected behavior
any suggestions how I can improve the script that the div have still same satus after the page was refreshed? I’m bit lost here.. thank you for the help.
function shHide (elementid,buid){
if (document.getElementById(elementid).style.display == 'none'){
$("#"+elementid).slideDown(250);
document.getElementById(buid).style.backgroundColor='red';
document.getElementById(buid).title=document.getElementById(buid).title.replace('show','hide');
} else {
$("#"+elementid).slideUp(450);
document.getElementById(buid).style.backgroundColor=’blue’;
document.getElementById(buid).title=document.getElementById(buid).title.replace('hide','show');
}
<div id="test" class="mdiv" onClick="shHide('testdiv', mdiv);" title="hide">test1123</div>