Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <button id="btn">Click Me</button>
  <script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script>
</body>
</html>
 
button {
  padding: 1em 2em;
  border-radius: 5px;
  border: 1px solid #1379BE;
  background: #3598DC;
  color: white;
  font-size: 12px;
  box-shadow: 0 2px 0 #1379BE;
}
button:focus{
  outline:none;
}
button:active{
  outline:none;
  margin-top: 1px;
}
 
var btnClicks = Rx.Observable.fromEvent($('#btn'), "click");
 
btnClicks
    .filter(function (value) {
        return value.altKey;
    })
    .subscribe(function () {
        console.log('Altキーを押しながらクリックしたね!');
    });
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers