HTML5 Mobile Development Road (--JQUERYMOBILE) page initialization process

Source: Internet
Author: User

This paper is the official HTML5 training course for Brother Lian it education organization, mainly introduces: HTML5 Mobile Development Road (--JQUERYMOBILE) page initialization process

A convenient description and more intuitive display of the Jquerymobile page initialization process and the triggering process for each event, I have drawn a flowchart:

650) this.width=650; "Src=" http://img.blog.csdn.net/20140505140123781?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvzgf3yw5nyw5iyw4=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" border:0px; "/>

The image is circled in red with the event in the interface, and the test code is as follows:

[HTML] view plain copy

Print? 650) this.width=650; "src=" Https://code.csdn.net/assets/CODE_ico.png "alt=" on Code View "Width=" "height=" 12 " Style= "border:0px;"/>650) this.width=650; "src=" Https://code.csdn.net/assets/ico_fork.svg "alt=" Derivation to My Code slice " Width= "height=" style= "border:0px;"/>

  1. <! DOCTYPE HTML>

  2. <html>

  3. <head>

  4. <title> Practice </title>

  5. <Meta charset="Utf-8">

  6. <Meta name="viewport" content= "width=device-width,

  7. initial-scale=1.0, maximum-scale=1.0, user-scalable=0; " />

  8. <link href="css/jquery.mobile-1.0.1.min.css"

  9. rel= "stylesheet" type="text/css"/>

  10. <script src="js/jquery-1.6.4.js"

  11. type="Text/javascript" ></script>

  12. <script src="js/jquery.mobile-1.0.1.js"

  13. type="Text/javascript" ></script>

  14. <script>

  15. $ (document). Ready (function (e) {

  16. Alert ("Document.ready is triggered");

  17. });

  18. $ (document). Live ("Mobileinit", function () {

  19. Alert ("Mobileinit event Trigger");

  20. });

  21. $ (document). Delegate ("#page_MobileInit0", "Pageinit", function () {

  22. Alert ("The Pageinit event of the Page_mobileinit0 page is triggered");

  23. });

  24. $ (document). Delegate ("#page_MobileInit0", "Pageshow", function () {

  25. Alert ("The Pageshow event of the Page_mobileinit0 page is triggered");

  26. });

  27. $ (document). Delegate ("#page_MobileInit1", "Pageinit", function () {

  28. Alert ("The Pageinit event of the Page_mobileinit1 page is triggered");

  29. });

  30. $ (document). Delegate ("#page_MobileInit1", "Pageshow", function () {

  31. Alert ("The Pageshow event of the Page_mobileinit1 page is triggered");

  32. });

  33. </Script>

  34. </head>

  35. <body>

  36. <section id="page_mobileinit0" data-role="page">

  37. <header data-role="header">

  38. <H1> page Events </H1>

  39. </Header>

  40. <div class="content" data-role="Content">

  41. <P>jquery mobile page initialization is via Mobileinit, $ (document). Ready () and Pageinit implementation </P>

  42. <a href="#" onclick="$ (document). Trigger (' Mobileinit ')"> Manual Trigger Mobileinit Event </a>

  43. <a href="#page_MobileInit1"> Next </a><br/> </P>

  44. </div>

  45. </Section>

  46. <section id="page_mobileinit1" data-role="page">

  47. <header data-role="header">

  48. <H1> page Events </H1>

  49. </Header>

  50. <div class="content" data-role="Content">

  51. <P>jquery Mobile page initialization is implemented through Pageinit <br/>

  52. <a href="#page_MobileInit0"> Return </a></P>

  53. </div>

  54. </Section>

  55. </Body>

  56. </html>

In addition to the events described above, there are 3 types of initialization events, such as Mobileinit, Ready (), and Pageinit, which are mainly used in mobile development.


HTML5 Mobile Development Road (--JQUERYMOBILE) page initialization process

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.