"; $("body").append(sTemp); $("#copyurl").select(); document.execCommand("copy"); $("#copyurl").remove(); swal('此連結已成功複製,歡迎您分享!'); } $(function () { $(window).scroll(function () { var scrollVal = $(this).scrollTop(); if(scrollVal < 150){ $("#article_conshare").hide(); }else if(scrollVal > 150){ $("#article_conshare").show(); } }); });$(".search-site-button").click(function(){$(".newestalertbg").fadeIn();$(".alert-site").fadeIn();});$(".newestalertbg").click(function(){$(".newestalertbg").fadeOut();$(".alert-site").fadeOut();});$(".alert-site-close").click(function(){$(".newestalertbg").fadeOut();$(".alert-site").fadeOut();});var town_ary = [];var default_city = "";var select_town = "";$(function() {if (default_city != "") {var option = '';option += '';Object.keys(town_ary[default_city]).forEach((element, index) => {if (select_town != "" && select_town == town_ary[default_city][element]) {option += ``;} else {option += ``;}});$("#town").html(option);}});function select_city(city) {$("#town").html('');var option = '';option += ``;Object.keys(town_ary[city]).forEach((element, index) => {option += ``;});$("#town").html(option);}