I have a contact script. It uses jQuery for it ajax queries and animations.
I also use it with the hashchange plugin to fix the back button. Here is the slow part.
After the flip animation finishes, the form slowly disappears. It seems that browsers are blocking for a second. I am trying to do this instantly (without blocking).
Here is the function responsible for handling the hash change event:
handleHashChange : function () {
All code can be seen at the link below, it is fully documented:
http://www.coolcontact.co.cc/beta/1.3/js/main.js
You can see that I used a lot of tips that I found on the Internet to optimize this script, except for using javascript native 'for' instead of '$ .each ()', but this is not that big deal here.
If someone wants to see slowness, try sending an empty message (verification is disabled) from the link below, then click the "Back" button in your browser:
(note: this is not in English, but guess it is pretty clear) ^ /)
http://www.coolcontact.co.cc/beta/1.3/
So how can I make this faster?
source share