Home > Enterprise >  How to programmatically fire an event to click inside an input field without using trigger, change o
How to programmatically fire an event to click inside an input field without using trigger, change o

Time:09-27

I know, the title sounds insane, but in an attempt to refactor some code, I am having trouble figuring out how to programmatically fire an event without using the following:

  1. trigger
  2. change
  3. click

The code below loads on a hook, and all I need to do is click inside the ID element below, but 'click();' or .on('click') aren't an option.

$("#id").data("kendoDropDownList").text(data[i].Text);
$("#id").data("kendoDropDownList").trigger('change'); // code that needs to be refactored

CodePudding user response:

I think you can use focus function.

$("#id").data("kendoDropDownList").focus()

  • Related