I have several input fields that are enhanced with jQuery auto-complete functionality. How to get the corresponding input field when a select event is triggered?
<
You can use $(this) or event.target.
$(this)
event.target
Then you can get the name using $(this).prop('name') or event.target.name.
$(this).prop('name')
event.target.name
demo