<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<select id="sel">
<option value="a">a</option>
<option value="b">b</option>
</select>
<script>
$("#sel").bind('change focus', function(){
var variableX = $(this).val();
alert(variableX);
});
</script>