我试图在移动设备上使用Kendo MultiSelect组件,但遇到了一些问题。当我使用触摸事件时,看起来我无法在kendo多选组件上使用清除按钮。如果我略微低于" x",则只会清除所选项目。使用鼠标时,清除按钮工作正常。
</head>
<body>
<div id="example" role="application">
<div class="demo-section k-content">
<h2>Invite Attendees</h2>
<label for="required">Required</label>
<select id="required" multiple="multiple" data-placeholder="Select attendees...">
<option>Steven White</option>
<option>Nige Buchanan</option>
<option>Laura Fuller</option>
</select>
<label for="optional">Optional</label>
<select id="optional" multiple="multiple" data-placeholder="Select attendees...">
<option>Steven White</option>
</select>
<button class="k-button" id="get">Send Invitation</button>
</div>
<style>
.demo-section label {
display: block;
margin: 15px 0 5px 0;
}
#get {
float: right;
margin: 25px auto 0;
}
</style>
<script>
$(document).ready(function() {
// create MultiSelect from select HTML element
var required = $("#required").kendoMultiSelect().data("kendoMultiSelect");
var optional = $("#optional").kendoMultiSelect({
autoClose: false
}).data("kendoMultiSelect");
$("#get").click(function() {
alert("Attendees:\n\nRequired: " + required.value() + "\nOptional: " + optional.value());
});
});
</script>
</div>
</body>
</html>