For specific radio button group
$("input[name='vehicle_way_two_radio']").click(function(){
vehicle_way_two=$('input:radio[name=vehicle_way_two_radio]:checked').val();
$("#vehicle_way_two").val(vehicle_way_two);
vehicle_way_one=$('input:radio[name=vehicle_way_one_radio]:checked').val();
$("#vehicle_way_one").val(vehicle_way_one);
getPrice();
});
For all radio buttons
$('input[type="radio"]').click(function(){
if($(this).attr("value")=="diversion_y"){
$("#addwaypointdiv").show();
$("#via-container").show();
}
if($(this).attr("name")=="vehicle_way_two_radio"){
var vehicle_way_two = $(this).attr("value");
$("#vehicle_way_two").val(vehicle_way_two);
}
});
$("input[name='vehicle_way_two_radio']").click(function(){
vehicle_way_two=$('input:radio[name=vehicle_way_two_radio]:checked').val();
$("#vehicle_way_two").val(vehicle_way_two);
vehicle_way_one=$('input:radio[name=vehicle_way_one_radio]:checked').val();
$("#vehicle_way_one").val(vehicle_way_one);
getPrice();
});
For all radio buttons
$('input[type="radio"]').click(function(){
if($(this).attr("value")=="diversion_y"){
$("#addwaypointdiv").show();
$("#via-container").show();
}
if($(this).attr("name")=="vehicle_way_two_radio"){
var vehicle_way_two = $(this).attr("value");
$("#vehicle_way_two").val(vehicle_way_two);
}
});
No comments:
Post a Comment