我在我的 ASP.NET web-forms 项目中使用 KendoMultiselect 控件。当鼠标离开下拉选项区域时,我希望关闭其动态下拉列表。我已经尝试了许多选项,例如下面的评论。
这是代码片段。
<select id="selInvestors" multiple="multiple" data-placeholder=""></select>
<script language='javascript'>
var myJsonObj = [{text: "Client", val: "4" },{text: "Employees", val: "16" },{text: "Other", val: "32" }];
$(function () {
$("#selInvestors").kendoMultiSelect({
dataTextField: "text",
dataValueField: "val",
dataSource: myJsonObj
});
var selinvCtl = $("#selInvestors").data("kendoMultiSelect");
$('#selInvestors').parent().css({ "width": "355" });
//The below statement is even executing when i hover over the dropdown options. I dont know why ? I want to close the downdown, whenever the mouse cursor goes out of the dropdown control.
$("ul[id*='selInvestors']").mouseout(function () { console.log('I am out'); /*selinvCtl.close();*/ });
});
</script>
请建议。