It looks like this line in the statechange event:
$('#content').load(State.data.home_page);
... causes the same page to load at the same time, which leads to crashes on my site. What can I do to fix this?

(function($) { function loadHome() { $('#content').load(site.url + '/ #primary', function() { $(this).fadeIn(50); }); }
Update
So, I found out that .pushState actually calls statechange .
So basically, I think this is what happens:
- User clicks
.site-title a pushState() is called, which calls statechange , which loads part of the page.- At the same time, it is also called
loadHome() , which loads the same thing.
I see, so I get multiple instances of the same page. I thought that statechange is only called when the user clicks the back button in the browser. Such things clear, but I still do not understand how to move on. I am not sure what to replace this .load line in the .load event, assuming the culprit.
J82
source share