Trying to get a working, simple example of using split-grid.
Created
April 1, 2019 16:26
-
-
Save fgeorges/2de98a6fc77e363b0c1bb1ed8ef57db0 to your computer and use it in GitHub Desktop.
Testing split-grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Split panels</title> | |
<script type="text/javascript" src="https://unpkg.com/split-grid/dist/split-grid.js"></script> | |
</head> | |
<body> | |
<div class="grid"> | |
<div class="column-1"></div> | |
<div class="column-2"></div> | |
<div class="row-1"></div> | |
</div> | |
</body> | |
<script type="text/javascript"> | |
window.onload = function() { | |
Split({ | |
columnGutters: [{ | |
track: 1, | |
element: document.querySelector('.column-1'), | |
}, { | |
track: 2, | |
element: document.querySelector('.column-2'), | |
}], | |
rowGutters: [{ | |
track: 1, | |
element: document.querySelector('.row-1'), | |
}] | |
}); | |
}; | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment