Jquery reload vs Press enter on Address bar
I'm using some jquery functions to align the elements on my page and not
just css. On firefox it works perfectly. On chrome (under mac os x) i have
some weird problem.
If i just type on the URL Bar the address and press enter it runs ok. If i
do a command + r (same thing as using ctrl + r) it dont runs the jquery
align.
As you can see in the second image, the position is messed. if i go and
just hit enter with the address bar selected, or resize... so it runs the
jquery again, it fix the positions.
Is there a way to force to run the $(document).ready().
I don't know why it is happening, i tried to put the script on the end of
the html with and without the $(document).ready(), in the beginning of the
file i already uses $(document).ready().
It seems to be an problem with the web-kit as the safari have the same
problem.
I noticed one thing:
If i put an alert on the page. If i do a command + r the alert appears
before the images loads. If i press the enter on the Address bar the alert
appears after. So it seems the jquery $(document).ready() runs after the
images are loaded.
No comments:
Post a Comment