jQuery.submit.js not fully working on dropdown select
Well i hope someone could help me with this.
I have some select dropdown boxes in a form they are looking like this:
- <select name="swap" data-placeholder="swap" class="form-control alertbox">
- <option></option>
- <option value="1">Yes</option>
- <option value="9">No</option>
- </select>
- <select name="repair" data-placeholder="repair" class="form-control alertbox">
- <option></option>
- <option value="1">Yes</option>
- <option value="9">No</option>
- </select>
now i have insert a jQuery plugin so when you click on "No" some sort of alert box popups onto the screen asking me if i am sure where i can click yes or no.
- $(document).ready(function(e) {
- $('.alertbox').change(function(e) {
- var selvalue=$(this).val();
- if(selvalue == 9){
- $.confirm({
- title:"Opgelet",
- text:"U staat op het punt om een status terug naar NEE te plaatsen! Bent u dit zeker",
- confirm: function(button) {
- },
- cancel: function(button) {
- },
- confirmButton: "Ja",
- cancelButton: "Nee"
- });
- };
- });
- });
But if i click "No" the value "No" stays selected in the select box. What i would like is when i click no that it falls back to the empty option <option></option>
Who could help me out. Keep in mind that it has to reset in its own select