Save last collapsed panel + restore to open and scroll to top of panel
This commit is contained in:
parent
860b7bad73
commit
278d42dbc9
|
@ -38,6 +38,16 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$(function(){
|
||||||
|
$(".collapse").on('show.bs.collapse', function(e) {
|
||||||
|
localStorage.setItem('activeTab', $(e.target).attr('id'));
|
||||||
|
});
|
||||||
|
var activeTab = localStorage.getItem('activeTab');
|
||||||
|
if (activeTab) {
|
||||||
|
$("#" + activeTab).collapse('show');
|
||||||
|
window.scroll(0, $("#" + activeTab).offset().top - 120);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
|
<link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue