瀏覽代碼

del districts

huaisian 3 年之前
父節點
當前提交
741af6e6d5
共有 1 個文件被更改,包括 1 次插入25 次删除
  1. 1 25
      js/index_match.js

+ 1 - 25
js/index_match.js

@@ -587,31 +587,7 @@ $('.match__next').click(function() {
     $('.container_match2').fadeIn(500);
 })
 // city result
-let cityResult;
-$.ajax({
-    method: "GET",
-    url: "../json/taiwan_districts.json",
-    dataType: "json",
-}).done(function (msg) {
-    cityResult = [...msg];
-    let str = '';
-    for(let i = 0; i < cityResult.length; i++){
-        str += `<option value="${cityResult[i]['zip']}-city">${cityResult[i]['name']}</option>`;
-    }
-    $('#designer-city').html(`<option value="" selected="selected" disabled>所在縣市</option>${str}`);
-    $('#designer-city').on('change', function() {
-        let selected = $(this).val().split('-')[0];
-        let countyStr = '';
-        for(let i = 0; i < cityResult.length; i++){
-            if(cityResult[i]['zip'] == selected) {
-                for(let j = 0; j < cityResult[i]['districts'].length; j++){
-                    countyStr += `<option value="${cityResult[i]['districts'][j]['zip']}-county">${cityResult[i]['districts'][j]['name']}</option>`;
-                }
-            }
-        }
-        $('#designer-country').html(`<option value="" selected="selected" disabled>所在地區</option>${countyStr}`);
-    });
-});
+
 
     //jQuery time
     var current_fs, next_fs, previous_fs; //fieldsets