PHPology is a collective of highly skilled, award winning, web gurus.
Contact Raj on 07985 467 213 or email [email protected]

jQuery Mobile and Disabling AJAX

Working on a clients site where a funny bug was appearing on a specific page of their site. Links found in the header nav were turned into an AJAX request. 

After disabling scripts, removing code to find out what the culprit was it came down to the jQuery Mobile script. Once this was disabled the nav links were fine and enabled back to the AJAX requests. 

Searching the world wide web few blog posts came up with the same tweaks which is highlighted below:

<script type="text/javascript">
$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
  });
</script> <script src="jquery-mobile.js"></script>