jQuery Mobile - >页面生命周期? [英] jQuery Mobile -> Page Lifecycle?

查看:119
本文介绍了jQuery Mobile - >页面生命周期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有像jQuery Mobile页面的生命周期?就像在init,show,hide / back或其他事件中被触发的事件一样?!

Is there something like a lifecycle for jQuery Mobile pages? Like events that get fired on init, show, hide/back, or whatever events?!

提前致谢!

推荐答案

简介



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

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

这篇关于jQuery Mobile - >页面生命周期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆