| 
									
										
										
										
											2022-01-20 22:44:32 +08:00
										 |  |  | $(document).ready( function () { | 
					
						
							| 
									
										
										
										
											2023-06-15 20:14:10 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // 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
										 |  |  |     }); | 
					
						
							| 
									
										
										
										
											2023-06-15 20:14:10 +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
										 |  |  | } ); |