I have a radio button which when clicked is displaying select box below so I could choose an option. My problem is that I can't get the value from select box. It returns as null. I guess problem is that it should have another change event in it. Can you tell me how to put another change event inside this change event?
Select box:
<div class="row">
<div class="col-md-6">
<div class="radio clip-radio radio-primary">
<input type="radio" id="radio3" name="vertical" value="Pricelist" />
<label for="radio3">
Pricelist
</label>
</div>
<div id="Pricelist" class="desc">
<div class="form-group">
<select class="cs-select cs-skin-elastic" name="pricelist" id="pricelist_select">
<option value="" disabled selected>Select pricelist</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</div>
</div>
jQuery
//Displaying select box when type radio button is clicked
$(document).ready(function() {
$("input[name=vertical]").on( "change", function() {
var test = $(this).val();
$(".desc").hide();
$("#"+test).show();
$("#pricelist_select").val();
$('#pricelist_select').trigger("change");
alert($("#pricelist_select").find(":selected").val());
$.cookie('pricelist_select', $("#pricelist_select").val());
} );
});
CSS for hiding select box
.desc { display: none; }