Jquery mobile 1.4 data

编程入门 行业动态 更新时间:2024-10-15 20:23:00
本文介绍了Jquery mobile 1.4 data-enhance = false不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试将我的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

本文发布于:2023-11-24 01:16:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623442.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:mobile   Jquery   data

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!