Attendance/static/nav.js

10 lines
509 B
JavaScript
Raw Permalink Normal View History

2021-12-12 02:38:10 -08:00
$(window).resize(function() {
var sidebar = document.getElementById('sidebar');
var container = document.getElementsByClassName('container')[0];
container.style.paddingLeft = 'calc(.75rem + ' + sidebar.offsetWidth + 'px)';
});
document.addEventListener("DOMContentLoaded", function(event){
var sidebar = document.getElementById('sidebar');
var container = document.getElementsByClassName('container')[0];
container.style.paddingLeft = 'calc(.75rem + ' + sidebar.offsetWidth + 'px)';
})