I am trying to do a string comparison like so in JQuery
$('#select_directory_type').on('change', function() {
window.alert($(this).val()); // I can see the selection is SOMETHING
if( SOMETHING === $(this).val() ){
// Never gets executed even when the selection is SOMETHING.
} });
Another question is, what is the difference between
$this.val()
and
$(this).val()
Thanks!