I made the following condition:
jQuery:
$( "#selectOption" ).click(function() {
var option = $( "#selectOption option:selected" ).val();
if(option!='escolha'){
if(option==2){
$( "#atendimento_a" ).remove();
$( "#locais_de_atendimento" ).remove();
$( "#dias_de_atendimento" ).remove();
}
if(option==3){
$( "#atendimento_a" ).remove();
$( "#locais_de_atendimento" ).remove();
$( "#dias_de_atendimento" ).remove();
$( "#eu_adoro" ).remove();
}
}
});
Form:
<select id="selectOption" name="selectOption">
<option>escolha</option>
<option value="1">destaque</option>
<option value="2">mini</option>
<option value="3">free</option>
</select>
If the return of the option select is 2 or 3, I remove the divs in question, how do I add the divs again, if the option is option 1? Without being duplicate or something like this ??