Cloudlog/assets/js/sections/station_locations.js

32 行
759 B
JavaScript

$(document).ready( function () {
// Use Jquery to hide div ca_state
2022-11-16 00:07:58 +08:00
$('#station_locations_table').DataTable({
2024-01-04 11:03:11 +08:00
"stateSave": true,
"language": {
2024-01-04 11:18:20 +08:00
url: getDataTablesLanguageUrl(),
2024-01-04 11:03:11 +08:00
}
2022-11-16 00:07:58 +08:00
});
$("#canada_state").hide();
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
if(selectedDXCCID == '1'){
$("#canada_state").show();
$("#us_state").hide();
}
$('#dxcc_select').change(function(){
if($(this).val() == '1'){ // or this.value == 'volvo'
console.log("CANADA!");
$("#canada_state").show();
$("#us_state").hide();
} else {
$("#canada_state").hide();
$("#us_state").show();
}
});
2022-11-16 00:07:58 +08:00
} );