Show / Hide div by Jquery [closed]

1

What I want to do is pretty simple, but it's not going.

HTML

      <select name="id_tipo_contacto" id="id_tipo_contacto">
          <option value="empresa">Alugar Filmes/Séries</option>
          <option value="casamento">Vender Filmes/Séries</option>
      </select>
      <div id="empresa" class="formulario"><h2 style="    color: #21BF16;
      font-weight: bolder;">R$07,99 Por dia.</h2></div>
      <div id="casamento" class="formulario" style="display:none;">R$70,00.</div>

jQuery

  <script src="js/jquery-3.2.1.min.js">
    var $j = jQuery.noConflict();
      $j("#id_tipo_contacto").on('change', function(){
          $j(".formulario").hide();
          $j('#' + this.value).show();
});
  </script>
    
asked by anonymous 16.09.2017 / 22:22

1 answer

2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><scriptlanguage="javascript">
<!--
$(document).ready(function() {
    var $j = jQuery.noConflict();
      $j("#id_tipo_contacto").on('change', function(){
          $j(".formulario").hide();
          $j('#' + this.value).show();
});
});
//-->
</script>

  <select name="id_tipo_contacto" id="id_tipo_contacto">
      <option value="empresa">Alugar Filmes/Séries</option>
      <option value="casamento">Vender Filmes/Séries</option>
  </select>
  <div id="empresa" class="formulario"><h2 style="    color: #21BF16;
  font-weight: bolder;">R$07,99 Por dia.</h2></div>
  <div id="casamento" class="formulario" style="display:none;">R$70,00.</div>
    
16.09.2017 / 22:31