1

I need to change the directory in the URL each time I'm loading a new page with AJAX. Right now it's working in Chrome & FF but not in IE.

$('a[data-link="inner"]').live('click', function (e) {
    pageToLoad = $(this).attr('href');
    loadContent(pageToLoad);
    window.history.pushState("","" , pageToLoad);
    e.preventDefault();
}

var loadContent = function (url) {
    $('.content').load(url + '.html');      
};

Does anyone know how to get this working in IE 9,8,7 ?

Rory McCrossan
  • 306,214
  • 37
  • 269
  • 303
  • Possible duplicate of [http://stackoverflow.com/questions/12497958/window-history-pushstate-issue-on-ie](http://stackoverflow.com/questions/12497958/window-history-pushstate-issue-on-ie) – Miguel-F Nov 27 '12 at 15:24
  • See also [http://stackoverflow.com/questions/11705241/ie-history-push-state](http://stackoverflow.com/questions/11705241/ie-history-push-state) – Miguel-F Nov 27 '12 at 15:25
  • 1
    IE does'nt have support for the history API, Google would have told you that by the time you finished writing the first line in your question ? – adeneo Nov 27 '12 at 15:30

0 Answers0