1
How do I make that when the user selects the drive, show the div of the contents according to the selected drive? It would be with jQuery?
<div class="form-group">
  <label>Selecione a unidade</label><br>
  <select class="form-control" id="list-lugar" name="unidade">
    <option value="0" disabled="true" selected="true">Selecione uma Unidade</option>
    <option name="PMA" value="200">PMA</option>
    <option name="BRB" value="200">BRB</option>
    <option name="MTO" value="100">MTO</option>
    <option name="CN" value="100">CN</option>
    <option name="SCS" value="100">SCS</option>
    <option name="TPL" value="100">TPL</option>
    <option name="SBC" value="100">SBC</option>
  </select>
</div>
<div class="PMA">
  <h1>Conteúdo 1</h1>
</div>
<div class="BRB">
  <h1>Conteúdo 2</h1>
</div>
Young that
$("."+$(":selected", this).attr("name"), "#unidades").show().siblings().hide();it’s the same thing you wrote, or if I put it all in one line it would be wrong?– hugocsl
In the same line is not wrong no. I like to separate sometimes pq becomes easier to read and change.
– Sam
I liked the methodology []’s
– hugocsl