I'm trying to get value of some elements and put them in one <select> list in <option> tag like:
Verify if the radio was checked and which radio is checked take section elements values and insert them with split in <select> as <option>;
In my example I have two sections/panels which can be selected through a radio input.
My problem is when I do the radio select because I use something like:
var scheduler = $( "#first-radio:checked" );
var cronos = $( "#second-radio:checked" );
$("#add-button").click( function() {
if ( scheduler || cronos ) {
alert('None of radio options were selected!');
} else{
alert("else where my code must run");
}
});
and normally should take else alert if one of two check box are selected when Add val button is pressed instead take if statement all the time and show if alert and I don't understand why :|