Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <input type="text" id="example" />
  <br />
  <input type="text" id="search" />
</body>
</html>
 
$('#example').on('keypress keyup keydown',function(event) { 
  // create the event
   var press = jQuery.Event(event.type);
   var code = event.keyCode || event.which;
   press.which = code ;   
  // trigger 
  $('#search').val(this.value);
  $('#search').trigger(event.type, {'event': press});
});
$('#search').on('keypress keyup keydown',function(event) { 
   // sample  
   console.log(event.type);
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
tiberiu.corbupro
0viewers