Multiple event handlers.

Multiple event handlers.

by Varun Krishna P

HTML

<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<input type="text" class="input-1" placeholder="Enter a Value"/>

JavaScript

$(function(){
  $(".input-1").on("keyup change", function(e){
    alert(e.type);
  });
});