Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

msie issue with JS Hashchange Event

Tags:

I am trying to load my wordpress based website with AJAX following this Tutorial. All of the code makes sence to me but they are using a plugin called JS Hashchange Event. The issue I am having is that in part it uses the $.browser.msie so when I run it with jQuery 1.9 I get a Uncaught TypeError: Cannot read property 'msie' of undefined error. I tried adding the js migrate plugin but it did not work. I read that I could add this bit of code

jQuery.browser={};(function(){jQuery.browser.msie=false;
jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){
jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();

but not sure where to put it. Anyone had this issue? Or maybe a better way to use AJAX with loading wordpress pages (keep the header and footer static)?