【发布时间】:2013-09-13 12:52:36
【问题描述】:
据记录,.live() 自 jquery 1.7 以来已被弃用,因此我将 .on() 用于我的按钮和页面事件。但问题是.on() 在我的 jquery 移动应用程序中无法正常工作。
<a href="#">、data-role=button和按钮点击事件的正确格式是什么
和 jquery mobile 中的页面事件(pageinit、pagebeforeshow)?
我使用的是 jquery 1.8.2 和 jquery mobile 1.2.0 和 phonegap 1.5。
提前致谢。
【问题讨论】:
-
什么不能正常工作?
$(<selector>).live("click", ...)的等价物是$(<parent element>).on("click", <selector>; ...)
标签: jquery performance jquery-mobile