When I click on Class (.device_phone_apple_x) Value 1 needs to get selected in this dropdown.
<select class="bookly-select-mobile bookly-js-select-category">
<option value="">Select brand</option>
<option value="1">Apple</option>
<option value="2">Samsung</option>
<option value="0">No category</option>
</select>
Also value 1 needs to be active in this dropdown.
<select class="bookly-select-mobile bookly-js-select-service">
<option value="">Select model</option>
<option value="1">iPhone X</option>
<option value="2">iPhone 8</option>
<option value="3">iPhone 8+</option>
</select>
Any help how I can make the JS code? Cuz nothing seems to work!?
I have this now.
$(function() {
$('.device_phone_apple_x').click(function(){
$('.bookly-select-mobile bookly-js-select-category').val(1);
$('.bookly-select-mobile bookly-js-select-service').val(1);
<script type="text/javascript">
// This is where the row with models show up
$(".device_phone").click(function(){
document.getElementById('device_choice').style.display='none';
document.getElementById('device_phone_brand').style.display='block';
});
// This is the stage where the row with the form does pop up
$(".device_phone_brand_apple").click(function(){
document.getElementById('device_phone_brand').style.display='none';
document.getElementById('device_phone_models_apple').style.display='block';
});
// Reload page
$("#annuleren_button").click(function(){window.location.reload();});