Skip to content

Instantly share code, notes, and snippets.

@TheoOliveira
Created July 15, 2020 17:47
Show Gist options
  • Select an option

  • Save TheoOliveira/96bc1611aba15bd614fab223d2a01567 to your computer and use it in GitHub Desktop.

Select an option

Save TheoOliveira/96bc1611aba15bd614fab223d2a01567 to your computer and use it in GitHub Desktop.
toggleNav: function (component) {
const barSize = component.getElementById('mySideBar');
const container = component.getElementById('grid-container');
console.log(barSize.offsetWidth);
console.log(container.style.marginLeft);
if (barSize != 0 && container != 0) {
barSize = '0';
container = '0';
} else {
barSize = '25%';
container = '25%';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment