so I use the below code to refresh a page on dropdownlist value changes and save the value in local storage and load it again:
<select class="CB" id="CB" disabled>
<option value="a">a</option>
<option value="b">b</option>
</select>
<script>
if(localStorage.getItem('CB')){
$('#CB').val(localStorage.getItem('CB'));
}
$('#CB').change(function(){
localStorage.setItem('CB',$('#CB').val() );
location.reload();
});
</script>
but the code above doesn't work for checkbox for some reasons! How can do the similar thing for a checkbox?