Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <select name="jobtype">
    <option value="nope">nope</option>
    <option value="Low Budget">Low Budget</option>
  </select>
  <input type="text" class="jobtype" />
</body>
</html>
 
$(document).ready(function () {
  
  function myEventHandler (e) {
    var val = $("select[name='jobtype']").val();
    
    if (e.keyCode === 27 || 
        this === e.target && val === 'Low Budget') {
      // do something
      console.log('Did something...');
    }
  }
  
  
  $(document).on('keyup', myEventHandler);
  $('.jobtype').on('change', myEventHandler);
});
Output

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

Dismiss x
public
Bin info
Oka-pro
0viewers