I am using Vanilla Masonry (the raw JS, non-jQuery version) as follows:
In head:
<script id="masonry" type="text/javascript" src="resources/js/masonry.js"></script>
In body:
<script>
window.onload = function() {
var wall = new Masonry( document.getElementById('ext-component-3'), {
columnWidth: 145
});
};
</script>
But I keep getting:
Uncaught ReferenceError: Masonry is not defined
Uncaught TypeError: Cannot call method 'appendChild' of undefined
Does anyone know what could be wrong in my setup?