Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" />
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/vendor/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
 <div class="row">
   <div class="large-12 columns">
     <h1>My Calculater</h1>
      <input type="text" id='input' placeholder='2+1'>
     <p id="output" class='panel'>?</p> 
     <a href="#" class='button'>Evaluate</a><br> 
   </div>
 </div>
</body>
</html>
 
$('a').on('click', function(){
  var input = $('#input').val();
  $('#output').html(eval(input));
});
Output 300px

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

Dismiss x
public
Bin info
natsnpro
0viewers