Last active
May 25, 2018 04:49
-
-
Save nickytoh/47c73ba7d7bb66507f9de0ecb055a744 to your computer and use it in GitHub Desktop.
JS Hack for Grid Auto Placement in IE Implementation of CSS Grid.
This file contains hidden or 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
// for each element | |
this.style['-ms-grid-column'] = Math.floor(i % 4) + 1; // 4 is the column number per row | |
this.style['-ms-grid-row'] = Math.floor(i / 4) + 1; // 4 is the column number per row |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment