Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  
  
<select id="customUser_id" name="customUser_id">
  <option value="2" label="Friends Of Friends">Friends Of Friends</option>
  <option selected="selected" value="3" label="Friends Only">Friends Only</option>
  <option value="4" label="Specific People">Specific People</option>
  <option value="0" label="Only Me">Only Me</option>
</select>
  
  
  <div id="customWallPost3"></div>
  
  
  
</body>
</html>
 
var arr_Infos = [
  'Only I can see this',
  '',
  'Only Friends of Friends can see this',
  'Only Friends can see this',
  'Only the people above can see this'
];
function popoulateInfo(){
 var sel =  $('#customUser_id').find(":selected").val();
  alert(sel);
  $('#customWallPost3').text( arr_Infos[ sel ] ); 
}
popoulateInfo();
$('#customUser_id').on('change',function(){  
  popoulateInfo();
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers