Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144063 | Apr 16,2019 02:13 PM UTC | Apr 18,2019 03:24 PM UTC | jQuery | 3 |
![]() |
Tags: ejComboBox |
<script type="text/javascript">
var empList = [ 'Kapil Sharma','David Linden','John Linden', "Harish Shree"]; var flag= true;
$(function () {
$('#list').ejComboBox({
dataSource: empList,
width: '250px',
placeholder: 'Select an employee',
popupWidth: '250px',
popupHeight: '300px',
open: function(args)
{
if(flag)
{
for (i=0;i< this.liCollections.length;i++)
{
var span = document.createElement("span");
span.classList="e-icon e-close";
this.liCollections[i].append(span);
}
flag=false;
}
},
select:function(args)
{
if(args.e.target.classList.contains("e-close"))
{
console.log("close icon is clicked");
// remove the item here based on your requirement.
}
}
});
});
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.