Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<html>
  <head>
    <title>Test</title>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://fb.me/react-0.13.1.js"></script>
    <script src="http://fb.me/JSXTransformer-0.13.1.js"></script>
    <script src="https://cdn.rawgit.com/ProgerXP/FileDrop/master/filedrop-min.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script type="text/jsx">
      var App = React.createClass({
       handleClick: function(e) {
          if (e.type === 'click') {
            console.log('Left click');
          } else if (e.type === 'contextmenu') {
            console.log('Right click');
          }
          if (e.nativeEvent.which === 1) {
            console.log('left click');
          } else if (e.nativeEvent.which === 3) {
            console.log('right click');
          }
       },
       render : function(){
           return <p onClick={this.handleClick} onContextMenu={this.handleClick} >Something </p>
       }
    });
      React.render(<App />, document.getElementById('app'));
    </script>
  </body>
</html>
Output

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

Dismiss x
public
Bin info
dhirajbodicherlapro
0viewers