mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
116 lines
3.5 KiB
HTML
Executable File
116 lines
3.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>API</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example" style="margin:auto; width:60%">
|
|
<div class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<div class="box-col">
|
|
<h4>Scroll to page</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<span class="k-textbox k-state-default"><input id="pageValue" value="4" class="k-input" style="float:none" /></span>
|
|
<button id="set" class="k-button">Scroll</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box-col">
|
|
<h4>Next / Previous</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<button id="next" class="k-button">Next</button>
|
|
<button id="previous" class="k-button">Previous</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="scrollView" style="height: 400px; width:930px;"></div>
|
|
|
|
<script id="scrollview-template" type="text/x-kendo-template">
|
|
<div>
|
|
<div style="width: 100%; height: 100%; background-image: #=setBackground(data.ProductID)#;"></div>
|
|
<p>#= data.ProductName #</p>
|
|
</div>
|
|
</script>
|
|
</div>
|
|
<script>
|
|
function setBackground(id) {
|
|
return "url(../content/shared/images/photos/" + (Math.floor(Math.random() * 28) + 1) + ".jpg)";
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
var dataSource = new kendo.data.DataSource({
|
|
type: "odata",
|
|
transport: {
|
|
read: {
|
|
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products"
|
|
}
|
|
},
|
|
serverPaging: true
|
|
});
|
|
|
|
$("#scrollView").kendoScrollView({
|
|
dataSource: dataSource,
|
|
template: $("#scrollview-template").html(),
|
|
contentHeight: "100%"
|
|
});
|
|
|
|
var scrollview = $("#scrollView").data("kendoScrollView");
|
|
|
|
var setValue = function () {
|
|
scrollview.scrollTo(parseInt($("#pageValue").val()));
|
|
};
|
|
|
|
$("#next").click(function () {
|
|
scrollview.next();
|
|
});
|
|
|
|
$("#previous").click(function () {
|
|
scrollview.prev();
|
|
});
|
|
|
|
$("#set").click(setValue);
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
#scrollView {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.k-scrollview-page > div {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.k-scrollview-page > div > div {
|
|
background-repeat: no-repeat;
|
|
background-size: cover;
|
|
background-position: center;
|
|
}
|
|
</style>
|
|
|
|
|
|
</body>
|
|
</html>
|