marcolago / flowtime.js

Flowtime.js HTML5/CSS3/JS Websites and Presentation Framework
https://marcolago.github.io/flowtime.js/
MIT License
1.34k stars 237 forks source link

Flowtime script has to be in body, not head #34

Closed DavidOliver closed 9 years ago

DavidOliver commented 9 years ago

I'm just starting to use Flowtime (thanks!), and have found that it doesn't work if the flowtime.min.js script is placed in the head of the HTML page, which took me a little while to figure out.

If this is expected/correct, maybe it could be put in the readme. :-)

marcolago commented 9 years ago

Hi, tanks for using it.

The scripts should be placed just before like in the examples (the script needs to check the html to find Flowtime elements so it has to run after the document is loaded). I'll update the readme to make it more clear.

Sorry for the inconvenience. Let me know if everything is fine.

DavidOliver commented 9 years ago

Oh, please don't apologise. I just thought it might help others. As an aside, I take it document.onload can't be used here?

It's working fine so far - thanks. I now need to get some custom styling in place and also see about getting our particular type of content in.

marcolago commented 9 years ago

Yes. document.onload should work but I’ve always found more straightforward to put scripts at the bottom of the document, maybe just because it makes simpler to manage basic dependencies.

Just a matter of “style” I suppose.

I’m curious about you “particular type of content” now. Can’t wait to see your work.