/* カスタマイズ用の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 (i=1; i<=8; i++) { cnd_chk = eval("frmCond.cond"+i); cnd_hid = eval("frm.cond"+i); if (cnd_chk && cnd_hid) { if (cnd_chk.checked){ cnd_hid.value = cnd_chk.value; } else { 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(); }); }()); }); /* ルート検索の出発地FW検索画面のタブ切り替え */ $(function() { $('.tab01 a').click(function(e) { e.preventDefault(); var $tab = $('.tab01 a'); var index = $tab.index(this); $tab.removeClass('current'); $(this).addClass('current'); $('[class^=freeword-result0]') .removeClass('block-on').addClass('block-off') .eq(index).addClass('block-on').removeClass('block-off'); }); }); /* 複合ルート検索画面のタブ切り替えと駅ルート候補のアコーディオン */ $(function() { $('.tab02 a').click(function(e) { e.preventDefault(); var $tab = $('.tab02 a'); var index = $tab.index(this); $tab.removeClass('current'); $(this).addClass('current'); $('[class^=route-type0]') .removeClass('block-on').addClass('block-off') .eq(index).addClass('block-on').removeClass('block-off'); }); $('.accordion-list01 a.route-summary').click(function(e) { e.preventDefault(); $(this).next().slideToggle(); $(this).parent().toggleClass('accordion-open').toggleClass('accordion-close'); }); }); ///////////////////////// /* スクロール */ ///////////////////////// $(function(){ /* ドロップダウン */ var flg = "menu-close"; $('.do-drop-on').click(function() { $('.drop-cond-menu').toggle(); if(flg == "menu-close"){ $('.drop-text').text('ATM設置場所で絞り込む'); $('.drop-ico').text('△'); flg = "menu-open"; }else{ $('.drop-text').text('ATM設置場所で絞り込む'); $('.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); } } } ///////////////////////// /* lbLANsの修正 */ ///////////////////////// $(function(){ $('.LANs-aco').toggle(); $('.LANs-aco-btn').click(function() { $('.LANs-aco').toggle(); }); });