I have datalist like below -
You can use input event for achieving such functionality, as below :
input
$(document).ready(function() { $('#name').on('input', function() { var userText = $(this).val(); $("#allNames").find("option").each(function() { if ($(this).val() == userText) { alert("Make Ajax call here."); } }) }) });