EDIT: iam using ajax to load text in my content that is why onload on head is not applicable.
I have an almost complete project here http://sandbox.littlegraffyx.com/bible/test2.html (enter gen 1:1 on bottom left to start)
The only problem I have is to ensure that my main div where the main text is displayed is fully loaded before I call a function that will autofit the text content on the window.
There are times that my autofit function is working and there are times it isn't and the only reason I can think of why it's not working is maybe the div isn't fully loaded yet when I call the function.
The scalequote sample is found in my other question here
Here are the searches I made and I can't see how can I apply the solutions offered in these post in my case that is why I am asking one myself. Hoping I will not be down voted for "lack of research"
thanks in advance and sorry for my english
http://pastebin.com/wwQumwKJ - my JS file
http://pastebin.com/FnyST8iz - my html file
http://pastebin.com/BYfSUjQJ - my css file
Except from getting the database contents, my php file is pretty much what is posted above.