jquery - data-ajax="false" for for all web pages -
i using j query mobile web site . website dont need ajax functionality . want native page links. in j query mobile page transfers in ajax mode. if want turn off need utilize syntax data-ajax="false"
don't need ajax.
can turn off ajax whole website
note : utilize include pages php mutual code work pages
on mobileinit
event, pass $.mobile.ajaxenabled = false;
disable ajax mobile page navigation:
$(document).bind("mobileinit", function () { $.mobile.ajaxenabled = false; });
proper format binding mobileinit
event:
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.css" /> <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> <script type="text/javascript"> $(document).bind("mobileinit", function () { $.mobile.ajaxenabled = false; }); </script> <script src="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.js"></script>
jquery core specific mobileinit
event handler the jquery mobile js file jquery mobile js file lastly event handler mobileinit
set before event fired.
reference: http://demos.jquerymobile.com/1.0/docs/api/globalconfig.html
jquery ajax jquery-mobile
No comments:
Post a Comment