I am using KendoMultiselect control in my ASP.NET web-forms project. I wish to close its dynamic dropdown, when the mouse leaves the dropdown option area. I have tried many options such as below with the comment.
Here is the code snippet.
<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>
Please suggest.
try .mouseleave() instead of .mouseout()