mirror of
https://github.com/aaronleetw/Attendance.git
synced 2024-11-15 03:21:38 -08:00
10 lines
No EOL
509 B
JavaScript
10 lines
No EOL
509 B
JavaScript
$(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)';
|
|
}) |