You have several issues in your code:
- you are pointing to an element with
id="form_1651_field_11"
but it was not in your html.
- you are using the same ID multiple times in your html. This is what classes are for. IDs are unique
- you are using an obsolete syntax for jquery and a some unnecessary steps in your js.
- your if/else block is missing some curly brackets
Also your logic seems weird for me. You are preselecting the option with value="1"
(the p should be hidden) but the p are there. Only on change you hide them. Are you sure about it.
$(function() {
$('#form_1651_field_11').change(function() {
if ($(this).val() == '3'){
$('.hide_on_call').css("display", "block");
}else{
$('.hide_on_call').css("display", "none");
}
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select class="input regeling" required="" style="width: 100%;" id="form_1651_field_11">
<option data-price="495.00" value="1"> Zelf betalen (€ 495,00)</option>
<option data-price="0.50" value="3"> Factuur naar club of werkgever versturen (€ 0,50)</option>
</select>
<p class="hide_on_call"><label for="form_1651_field_12">Indien je club of werkgever betaald betaalt, vul dan onderstaande velden in:</label><br></p>
<p class="hide_on_call"><label for="form_1651_field_14">Contactpersoon</label><br><input type="text" name="form_1651_field_14" id="form_1651_field_14" value="" label="Contactpersoon" class="input werkgever" style="width: 100%"></p>
<p class="hide_on_call"><label for="form_1651_field_15">E-mailadres factuur</label><br><input type="text" name="form_1651_field_15" id="form_1651_field_15" value="" label="E-mailadres factuur" class="input werkgever" style="width: 100%"></p>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…