jcadima
8/20/2018 - 3:47 PM

Hide show on select change

$('#banner').on('change', function() { if(this.value == "1") { $('#banner_text').hide(); } else { $('#banner_text').show(); } });


https://codepen.io/anon/pen/vzYXoP

<select id="banner">
     <option value="" selected>--- please select ---</option>
    <option value="1" >Yes</option>
    <option value="0">No</option>
</select>


<div id="banner_text">
  BANNER TEXT
</div>





$('#banner').on('change', function() {
  if(this.value == "1") {
    $('#banner_text').hide();
  } else {
    $('#banner_text').show();
  }
});