salvattore icon indicating copy to clipboard operation
salvattore copied to clipboard

Footer JS face-palming

Open khawkins98 opened this issue 10 years ago • 3 comments

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?');
  }

khawkins98 avatar Apr 03 '14 12:04 khawkins98

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!

rnmp avatar Apr 05 '14 20:04 rnmp

:+1:

giovannipds avatar Feb 13 '16 06:02 giovannipds

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

giovannipds avatar Feb 13 '16 06:02 giovannipds