Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <select>
    <option value='a'>a</option>
    <option value='b'>b</option>
  </select>
  <div class='btn-tag'>b</div>
</body>
</html>
 
$(function(){
    $('select').change(function(){
      if($('.btn-tag').text() == $('select').val()){
        alert('test');
      } 
    });
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers