我正在尝试在我的未来项目中使用Kendo UI mobile做演示应用程序。目前,我正在使用kendo ui mobile的试用版来测试应用程序,它可以在http://khambuzz.cu.cc/kendoui/test.html找到。这是我的代码。jquery代表不在kendo ui mobile中工作!?
<!DOCTYPE html><!--HTML5 doctype-->
<html>
<head>
<title>Mialisto</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" href="assets/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="assets/css/kendo/kendo.mobile.all.min.css" />
<!-- the line below is required for access to the appMobi JS library -->
<script type="text/javascript" src="assets/js/lib/jquery.min.js"></script>
<script src="assets/js/lib/console.js"></script>
<script type="text/javascript" src="assets/js/lib/kendo.mobile.min.js"></script>
<style>
li{
cursor: pointer;
}
</style>
</head>
<body>
<!-- basket template -->
<div data-role="view" data-layout="default" id="autobox">
</div>
<section data-role="layout" data-id="default">
<header data-role="header">
<div data-role="navbar">MIALISTO</div>
</header>
<!--View content will render here-->
<footer data-role="footer">
</footer>
</section>
<script>
$(document).ready(function(){
$('#autobox').append('<div class="mini-autobox"></div>');
$('.mini-autobox').append("<ul ><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li><li>hello</li></ul>");
$('ul').kendoMobileListView();
window.g = $('.mini-autobox').delegate('li', 'click', function(){
alert("say hello to everyone!!!");
});
});
</script>
<script>
/* This sample function records an event ID, as well as an optional
set of name/value pairs as a query string to the statMobi Analytics
logs.*/
function addAnalyticsDataPoint(eventID,queryString)
{
try
{
if (queryString==null) { queryString = ""; }
AppMobi.analytics.logPageEvent("/application/" + eventID +
".event", queryString, "", "", 0, "index.html");
}
catch(e) {}
}
/* Drop this javascript function into the <head> element of your
application's index.html page and call it everywhere you want to
record an analytics event. It takes two parameters. The first is an
event identifier string and the second is an optional key/value query
string parameter. */
</script>
<script type="text/javascript">
var app = new kendo.mobile.Application($(document.body),
{
transition:'slide'
});
</script>
</body>
</html>
现在的问题是,我使用jQuery的代表在本次测试中,其桌面浏览器工作正常,但它不能在移动设备或平板电脑的。我不确定有什么问题。桌面浏览器控制台中没有错误。但它仍然不适用于移动设备。只有在删除kendoUI脚本时,它才能在桌面和移动设备上运行。是否与试用版和付费版相关?或者在我的代码中是否有任何错误。请从桌面和移动浏览器的上面链接看看你会看到问题。
谢谢!
我有完全相同的问题,一直让我沮丧。会让你知道我是否找到任何东西。 – zillaofthegods 2013-04-04 19:21:44