Created
December 21, 2016 10:29
-
-
Save ibanner/2bfd16f757bd9a7c36ffc3bf4473d80a to your computer and use it in GitHub Desktop.
Before ALM, this is what I used and worked fine.
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
var x = document.getElementsByTagName("html")[0].getAttribute("dir"); | |
// console.log(x); | |
if ( x == 'rtl') { | |
jQuery('.grid').masonry({ | |
itemSelector: '.grid-item', | |
columnWidth: '.grid-item', | |
percentPosition: true, | |
originLeft: false, | |
resizesContainer: true | |
}); | |
// console.log('originLeft: false'); | |
} else { | |
jQuery('.grid').masonry({ | |
itemSelector: '.grid-item', | |
columnWidth: '.grid-item', | |
percentPosition: true, | |
resizesContainer: true | |
}); | |
// console.log('originLeft: true'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment