gpt4 book ai didi

CSS 过渡 iOS 7 Phonegap

转载 作者:行者123 更新时间:2023-11-28 12:16:52 25 4
gpt4 key购买 nike

我使用了这个 http://proto.io/freebies/onoff/ 中的拨动开关在我的 phonegap 应用中。

它在 android 和 iOS6 上运行良好,但在 iOS 7 phonegap 应用程序上无法运行。

有谁知道 iOS7 Webview 上的 CSS 转换是否有问题?

最佳答案

我更改了以下代码

Switchery.prototype.handleOnchange = function(state) {
var evt = new Event('click');
this.element.dispatchEvent(evt);

if (typeof Event === 'function') {
var event = new Event('change', { cancelable: true });
this.element.dispatchEvent(event);
} else {
this.element.fireEvent('onchange');
}
};

进入这个

Switchery.prototype.handleOnchange = function(state) {
if ("createEvent" in document) {
var event = document.createEvent("HTMLEvents");
event.initEvent("change", false, true);
} else {
this.element.fireEvent('onchange');
}
};

此外,我在 switchery.js 的 setPosition() 函数中评论了以下几行(以下多行)

//    this.setSpeed();

对于我的完全改变

https://github.com/bharatpatil/switcheryJS-phonegap/blob/master/switchery.js

关于CSS 过渡 iOS 7 Phonegap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21018390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com