0
I wanted to use a jQuery effect, for example the hide()
. You can implement this effect by clicking on a <option>
?
<div class="form-group" style="margin-left: 10px;margin-right:10px;width:50%;">
<label>Selecione a categoria</label><br>
<select class="form-control" name="categoria" id="cat" required>
<option value="0" disabled selected hidden>Categoria</option>
<option class="bt1">Impressão Digital (frente)</option>
<option class="bt2" value="2">Impressão Digital (frente/verso)</option>
</select>
</div>
In this case, my goal was that by clicking one of these <option>
a certain <div>
hide (using hide()
).
I’ve tried using this jQuery code and it doesn’t work:
<script>
$(document).ready(function() {
$(".bt1").click(function() {
$(".div1").siblings().hide();
});
});
</script>
Hello Eduardo Worrel. I tried to solve my problem using your code but it didn’t work. Thanks anyway :)
– Luís Briga