/* カスタマイズ用のJavaScriptコードをここに記述してください */ function searchGps() { custSearchTopSubmit(document.formGps); ZdcEmapMakeGPSCondParams(document.formGps); document.formGps.submit(); } function searchAdcd(adcd) { custSearchTopSubmit(document.formAddrL); document.formAddrL.adcd.value = adcd; document.formAddrL.submit(); } function searchList(area1) { custSearchTopSubmit(document.formAddrL); document.formAddrL.area1.value = area1; document.formAddrL.submit(); } /* 絞込条件 */ function custSearchTopSubmit(frm) { var cnd_chk,cnd_hid; cnd_chk = ""; cnd_hid = ""; var frmCond = document.formCond; if (frmCond) { for (var i=1; i<=17; i++) { cnd_chk = eval("frmCond.cond"+i); cnd_hid = eval("frm.cond"+i); //alert(cnd_chk.value); //alert(cnd_hid); if (cnd_chk && cnd_hid) { if (cnd_chk.checked) cnd_hid.value = cnd_chk.value; else cnd_hid.value = ""; //alert(cnd_hid.value); } } var fil; var fil_list = frmCond.plfilter; if (fil_list) { if (fil_list.type == "select-one") { fil = fil_list.options[fil_list.selectedIndex].value; } else { fil = fil_list.value; } if (frm.plfilter) { frm.plfilter.value = fil; } if (frm.filter) { frm.filter.value = fil; } } } } $(function(){ /*------------ TOPのタブ切り替え ------------*/ (function changeSearchType() { var $nav_list = $(".local-nav-01 li"); if (!$nav_list.length) return; var $contents = $(".wrap_tabs > section"); var idx = $nav_list.index($nav_list.filter(".is-current")); if (idx < 0) idx = 0; $contents.hide(); $contents.eq(idx).show(); $nav_list.on("click", function() { var idx = $nav_list.index(this); $nav_list.removeClass("is-current"); $(this).addClass("is-current"); $contents.hide(); $contents.eq(idx).show(); }); }()); /*------------ FW検索結果のタブ切り替え ------------*/ (function changeFWResult() { var $nav_list = $(".local-nav-02 li"); if (!$nav_list.length) return; var $contents = $(".wrap_tabs > section"); var idx = $nav_list.index($nav_list.filter(".is-current")); if (idx < 0) idx = 0; $contents.hide(); $contents.eq(idx).show(); $nav_list.on("click", function() { var idx = $nav_list.index(this); $nav_list.removeClass("is-current"); $(this).addClass("is-current"); $contents.hide(); $contents.eq(idx).show(); }); }()); /*------------ 条件で絞りこむのトグル/都道府県のトグル ------------*/ (function toggleList() { var $list = $(".js-toggle-01 dd"); if (!$list.length) return; $list.hide(); $(".js-toggle-01 dt").on("click", function() { $(this).toggleClass("is-close"); $(this).next().toggle(); }); }()); }); ///////////////////////// /* スクロール */ ///////////////////////// $(function(){ /* ドロップダウン */ var flg = "menu-close"; $('.do-drop-on').click(function() { $('.drop-cond-menu').toggle(); if(flg == "menu-close"){ $('.drop-text').text('ジャンルで絞り込む'); $('.drop-ico').text('△'); flg = "menu-open"; }else{ $('.drop-text').text('ジャンルで絞り込む'); $('.drop-ico').text('▽'); flg = "menu-close"; } }); }); /* 絞込条件追加 */ function setCond(form){ var condList = document.getElementById('condList').getElementsByTagName('input'); for(var i = 0; i < condList.length; i++){ if(condList[i].type == 'checkbox' || condList[i].type == 'radio'){ if(!condList[i].checked){ continue; } var hid = document.createElement("input"); hid.setAttribute("type", "hidden"); hid.setAttribute("name", condList[i].id); hid.setAttribute("value", condList[i].value); form.appendChild(hid); } } }