Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div>
    <input type="text" id="input">
    <div class="typing"></div>
  </div>
  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  <script src="https://unpkg.com/@reactivex/rxjs@5.0.0-beta.12/dist/global/Rx.js"></script>
</body>
</html>
 
const showTyping = () =>
  $('.typing').text('User is typing...');
const showIdle = () =>
  $('.typing').text('');
const input$ = Rx.Observable
  .fromEvent($('#input'), 'input')
  .do(() => showTyping())
  .debounceTime(1000)
  .subscribe(() => showIdle());
Output

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

Dismiss x
public
Bin info
martinsikpro
0viewers