我正在尝试将我的JQM应用程序从1.3更新到1.4,并且在某些元素上,data-enhance =false不再起作用...元素仍然增强...
I'm trying to update my JQM app from 1.3 to 1.4, and on some element, data-enhance="false" doesn't work anymore… The elements remains enhanced…
jsfiddle: jsfiddle/matthieubrunet/RB9Qw/
jsfiddle : jsfiddle/matthieubrunet/RB9Qw/
<div data-role="page" id="home"> <div data-role="header"> <h1>JQM 1.4.3</h1> </div> <div data-role="content"> <label for="yes">Yes</label> <input type="checkbox" name="yes" id="yes" data-enhance="false" /> </div> </div>我试图激活ignoreContentEnabled选项,但它不起作用:
I tried to activate the ignoreContentEnabled option, but it doesn't work :
$( document ).on( "mobileinit", function() { $.mobile.ignoreContentEnabled = true; });这是一个错误,还是我错过了什么?
Is it a bug, or am I missing something ?
非常感谢你的帮助。
推荐答案把你的脚本
$( document ).on( "mobileinit", function() { $.mobile.ignoreContentEnabled = true; });。官方文档声明,一旦jquery mobile js被加载,就会调用mobileinit: http://api.jquerymobile。 com / global-config /
just before loading jquery mobile js. official docs state that mobileinit gets called as soon as jquery mobile js gets loaded : api.jquerymobile/global-config/
因此订单应为:
jquery.js - > mobileinit binding script-> jquery.mobile.js
jquery.js -> mobileinit binding script-> jquery.mobile.js
更多推荐
Jquery mobile 1.4 data
发布评论