Ajax calls can be disabled in jQuery Mobile by handling mobileinit event. This event is fired as soon as jQuery Mobile starts loading, and according to jQuery Mobile default settings, Ajax calls are always enabled. So, in order to get the results, you need to bind your event handler before jQuery Mobile is loaded.
Let's see how to do this
<html>
<head>
<link href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
$(document).bind("mobileinit",function(){
$.mobile.ajaxEnabled=false;
});
</script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<!-- Content in body -->
</body>
</html>
Note: mobileinit event is bound before jQuery Mobile loads.
For more info visit
No comments:
Post a Comment