I am constructing table with input type text and span with role button inside the . I want to trigger javascript function when user clicked on span with role button. Here is my span
<th>
<span data-field=@COLUMN_NAME class="k-filtercell" data-role="filtercell">
<span>
<input id="COLUMN_NAME" data-bind="value: value" style="width:120px" aria-label="Name" title="Name" data-text-field=@COLUMN_NAME role="textbox" aria-readonly="false" aria-autocomplete="list" >
<span unselectable="on" class="k-icon k-clear-value k-i-close k-hidden" title="clear" role="button" onclick="filterInputBtn();" tabindex="-1"></span>
</span>
</span>
</th>
I am triggering javascript function
$(document).ready(function () {
filterInputBtn = function () {
var inputHTML = $(this).closest('input').val();
}
});
But the click event is not getting triggered. Please let me know how to trigger click event from span with role button