Data-ajax= "false"

Source: Internet
Author: User

Recently in doing a project, because it involves cross-platform, so the use of jquerymobile this framework, in the development process, the first for the purpose of testing, using a Chrome browser to test the run. The following questions are described:

When in first.html, there is a link such as: <a href= "second.html" data-role= "button" id= "submit" > Login </a>

In second.html, for example, I've quoted the highcharts jquery Diagram plug-in, which will generate some charts in the Second.html page.

But in this case, when I click on the "Login" button in Chrome browser, I link to the second page, but the second page chart does not show, need to refresh to show the chart, so I combined the phonegap, the project cloth to the Android phone for testing, also so. I was very depressed, I later changed the 360 browser to test, although does not support the Jquerymobile framework theme style display, but it links the past can suddenly appear in the chart, and do not need to refresh. In this case, I began to doubt whether the browser link to load the page is not the same way the problem.

It takes a lot of time to locate the problem in the middle anyway. It is also because the new contact with this kind of technology, not very fine. Later think about or after this restore, back to the beginning, the Jquerymobile link looked at, there is such a paragraph:     jquery mobile support all the standard HTML format, in order to make the experience smoother, jquery Mobile will automatically turn all links in the same domain to the AJAX request, and use the animation transition effect to switch to the other domain links or contains rel= "external", data-ajax= "false" The link to the attribute and the link containing the target attribute are not loaded through Ajax and the page is refreshed as a whole. In this regard, I have to consider whether it is because of chrome in order to improve the loading speed of the page, the use of Ajax loading, the page will not be refreshed as a whole. So I added data-ajax= "false" to the button, and then it was OK. The correct way is as follows: <a href= "second.html" data-role= "button" id= "Submit"  data-ajax= "false"  > login </a>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.