且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery Mobile - >页面生命周期?

更新时间:2023-01-25 17:07:57

简介



此处的所有信息也可以在我的博客 文章 ,您还可以找到工作示例。

Intro

All information found here can also be found in my blog ARTICLE, you will also find working examples.

事件 pagebeforecreate

事件 pagecreate


***活动,如果你想动态添加页面内容,让jQuery
移动风格你的新内容。不要在ajax调用的情况下使用它,
pagebefore show应该然后使用但是所有动态添加的内容
它们必须是手动增强

事件 pageinit


它只会在每页加载时触发一次,除非页面被手动刷新,否则任何返回页面的
都不会再次触发它

It will only trigger once per page load, any return to the page will not trigger it again, unless page is manually refreshed

活动 pagebeforehide

活动 pagebeforeshow


页面操作的***事件

Best event for the page manipulation

活动 pageremove

活动 pagehide

事件 pageshow


只有可以初始化和使用其他图形jQuery / javascript的事件,例如
图表工具或轮播

Only event where other graphic jQuery/javascript can be initialized and used, like graph tools or carousels



其余的:



活动 pagebeforechange


总是会触发两次,所以跳过它

Will always trigger twice so skip it

活动 pagechange


总是会触发两次,所以跳过它

Will always trigger twice so skip it

如果你想更多地了解这个主题以及页面事件的整体工作方式,请看看我的其他 文章 。或者找到它 HERE 。只需搜索名为页面事件转换顺序的章节。但也可以在任何地方阅读所有内容。

If you want to find more about this topic and how page events work overall take a look at my other ARTICLE. Or find it HERE. Just search for the chapter called Page events transition order. But also read everything anywhere.

官方文档: http://jquerymobile.com/demos/1.2.0/docs/api/events.html