salvattore
salvattore copied to clipboard
Footer JS face-palming
Understand why this JS needs to be invoked at the document end, however I added it to my CMS and like a fool I failed to realize that it was loading at the document head and then I burned 30 minutes debugging.
Maybe a stronger note about this needing to be in the footer would help others? Or adding a debug line to the non-minified version?
Ala @line336:
if (gridElements.length == 0) {
console.log('Salvattore fail. Are you sure you defined the JS at the end of your document and added "data-columns" to the parent element?');
}
This is a good idea. I will just make sure people add it in the footer by saying so in the website next time I updated it. Thanks!
:+1:
I would also say that, sometimes, I'd prefer the script at head
tag, because I don't want that my customer see the content without the columns... does anybody else think the same? :P