jquery mobile和jquery ui不兼容
jquery mobile and jquery ui not compatitble
am正在开发一个可以在两个桌面上工作的html5应用程序,平板电脑和移动设备在使用进度条和对话框时陷入了困境。起初我一直在使用jquery-mobile,但直到现在,我才意识到两者结合使用效果不佳。这是两个插件效果的示例代码
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>dialogbox demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<script>
$(document).ready(function () {
$().lowStorageSpace();
});
$.fn.lowStorageSpace = function () {
$('<div></div>').appendTo('body')
.html('<div><h5>You are running out of space.backup or sync data before you proceed!!</h5></div>')
.dialog({
modal: true, title: 'Low storage space!!', zIndex: 10000, autoOpen: true,
width: 'auto', resizable: true,
buttons: {
Sync: function () {
//sync();
$(this).dialog("close");
},
Backup: function () {
// backup();
$(this).dialog("close");
},
Cancel: function () {
//cancel();
$(this).dialog("close");
}
},
close: function (event, ui) {
$(this).remove();
}
});
}
</script>
</body>
</html>
当我注释jquery.mobile-1.2.0.min.js时,上面的代码运行得很好。但我真的需要在我完整的应用程序中使用它。如果能帮助我如何使用这两个,我们将不胜感激。我见过很多类似的问题,但农解决了我的问题提前谢谢。
我同意这是一个冲突。在我看到的jquery ui和jquery mobile的所有示例中,我没有看到显示这两者可以在同一脚本上使用的代码。我会使用两个不同的脚本,一个用于ui,另一个用于mobile。这样就不应该有任何冲突。
相关文章:
- TypeError:在不兼容的接收器nodejs上调用了方法Uint8Array.length
- CKJustify和Color Button插件之间的不兼容
- Jquery不允许来自多个选择列表的相同值
- 在不兼容的接收器上调用的方法Set.prototype.add未定义
- 自动完成 jquery 不起作用
- 悬停时的Jquery不起作用
- JQuery不会在Safari以外的任何浏览器中加载
- 使用DateTimePicker插件的JQuery不起作用
- jQuery脚本滚动在iDevices上不兼容
- jQuery.change() 与 addEventListener 不兼容
- 插入到 DOM 中的 jQuery 不跨浏览器兼容
- jQuery 1.8.0 到 1.8.1 与 .on() 选择器不兼容
- jquery mobile和jquery ui不兼容
- Jquery 2脚本不兼容
- Angular js是否与jquery的multiselect不兼容?
- jQuery UI Datepicker和Rails不兼容
- jqTouch是否与jquery.colorbox.js不兼容?
- AngularJS与jquery-mobile的header不兼容
- 日期时间选取器和 jquery 版本不兼容
- 与formatter.js和jquery验证插件不兼容