Jquery events bind
tests sur input
by toubia95
HTML
<input id="saisie" type="search"><br>
<br><div id="display">
</div>
Babel + JSX
$("#saisie").bind('keyup keydown keypress change input search cut copy paste propertychange', () => {
$("#display").html($("#saisie").val());
});
/*
references :
- http://stackoverflow.com/questions/15727324/for-a-javascript-autocomplete-search-box-must-we-use-the-input-event-handle
- https://api.jquery.com/category/events/form-events/r
- http://www.w3schools.com/jsref/dom_obj_event.asp
- http://www.quirksmode.org/dom/events/
- https://developer.mozilla.org/en-US/docs/Web/Events/input
- http://knockoutjs.com/documentation/textinput-binding.html
- https://www.w3.org/TR/uievents/
- http://www.w3schools.com/js/js_events_examples.asp
- http://stackoverflow.com/questions/17384218/jquery-input-event
*/