什么数据AJAX ="假"真的吗?

问题描述:

在我的网站的链接不工作,我得到了使用数据AJAX我的锚=假没有得到真正的解释的解决方案。有人可以帮我吗?

The links on my site don't work and I got an solution of using data-ajax="false" on my anchors without getting a true explanation. Can someone help me?

数据AJAX 是jQuery Mobile的一个特点。 JQM默认会尝试加载用于改善用户体验和转换通过AJAX页面。如果设置数据AJAX =假然后JQM会做一个正常的页面请求,而不是使用AJAX。这可以用来在形式以及链接

data-ajax is a feature of jQuery Mobile. JQM by default will try to load pages via ajax for improved user experience and transitions. If you set data-ajax='false' then JQM will do a normal page request instead of using ajax. This can be used on forms as well as links.

文档

这告诉做一个完整的页面重载的框架,以清除阿贾克斯散列的网址

This tells the framework to do a full page reload to clear out the Ajax hash in the URL

如果要禁用,而不是增加阿贾克斯所有链接,然后数据AJAX 来的一切,你可以做到这一点是这样的:

If you want to disable ajax on all of your links then instead of adding data-ajax to everything, you can do it like this:

$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});