What I have now:
So i have this HTML5 Datalist with a bunch of options in it, and I have 2 events firing. One when the user types out something that
To handle click only event here is the solution.
$("#book_search").bind('select', function () {
alert("changed");
});
You can also listen to the 'select' event on the input field.
$('#name').bind('select', function() {
// handle input value change
});
Use the input
event instead of the other events. It's actually designed to cover what you want:
$("#name").bind('input', function () {
window.checkModelData(this);
});
I made a jsfiddle for you to try it out.