I'm trying to make it so when my #display-select is == display1, display2 or display4 (but NOT 3) then it shows a div. But I can't figure out how to make that or statement.
$(function() {
$('#display-select').change(function(){
if($('#display-select').val() == 'display1') {
$('#greenhouse-gas').show();
} else {
$('#greenhouse-gas').hide();
}
});
});
Changed to this, still not working:
$(function() {
$('#display-select').change(function(){
if($('#display-select').val() === 'display1' || 'display2') {
$('#greenhouse-gas').show();
} else {
$('#greenhouse-gas').hide();
}
});
});