Jquery Mobile - Ajax is enabled by default but I get full page refresh on POST

眉间皱痕 提交于 2019-12-31 02:24:05

问题


I created a jQuery mobile application using ASP.NET MVC and in the jQuery mobile documentation it's mentioned that Ajax is enabled by default for page transitions on clicking a link or submitting the form.

  • In my case, when I submit the form,
  • I get a full page refresh and I don't see the spinning loader.
  • I get a flash of blank page and then page gets loaded.
  • My page is similar to a survey page where one question will be displayed with list of options to select and then click Next.
  • When user clicks Next it submits form and fetches next question via controller. So I am not sure what I am missing.

Please advise

Thanks in advance


回答1:


You can try out to turn off the page transitions.Jquery mobile is still not very smooth in page transitions.May be that is causing the problem.

$(document).on( "mobileinit", function() {
            $.mobile.defaultPageTransition = "none";
        });

Please refer

jQuery Mobile flickering screen during transitions



来源:https://stackoverflow.com/questions/16522886/jquery-mobile-ajax-is-enabled-by-default-but-i-get-full-page-refresh-on-post

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!