我使用pull-to-refresh new加载数据。但是我希望在下面显示第二个pull-to-refresh-button,并显示更多数据。 这可能吗?
由于
<div data-role="view" data-init="viewInit" data-model="viewModel">
<ul data-role="listview" data-template="foo-template" data-bind="source: dataSource"></ul>
</div>
<script type="text/x-kendo-template" id="foo-template">
#: name # - #: modified #
</script>
<script>
var i = 0;
var viewModel = kendo.observable({
dataSource: new kendo.data.DataSource({ name: "record" + i, modified: +new Date() })
});
var viewInit = function (e) {
var scroller = e.view.scroller;
scroller.setOptions({
pullToRefresh: true,
pull: function () {
loadMore();
scroller.pullHandled();
}
});
}
var loadMore = function () {
var max = i + 5;
var data = [];
for (; i < max; i++) {
viewModel.dataSource.add({ name: "record" + i, modified: +new Date() });
}
}
new kendo.mobile.Application();
</script>