/* カスタマイズ用のJavaScriptコードをここに記述してください */ /* 現在地検索 */ function searchGps() { custSearchSubmit(document.formGps); ZdcEmapMakeGPSCondParams(document.formGps); document.formGps.submit(); } /* 住所リスト検索 */ function searchAdcd(adcd) { custSearchSubmit(document.formAddrL); document.formAddrL.adcd.value = adcd; document.formAddrL.submit(); } /* 絞込条件 */ function custSearchSubmit(formTo) { // 画面側の絞込条件(formCond)を取得 var frm = document.formCond; if (!frm) return; // 絞り込み設定(ZdcEmapCond)取得 if (ZdcEmapCond.length > 0) { for(var i=0; i < ZdcEmapCond.length; i++) { custCond = eval("frm.cond"+ZdcEmapCond[i]); if (custCond) { if (custCond.type == 'hidden' || (custCond.value && custCond.checked == true)) { condto = document.createElement("input"); condto.setAttribute("type", "hidden"); condto.setAttribute("name", "cond"+ZdcEmapCond[i]); formTo.appendChild(condto); condto.value = custCond.value; } } } } } /*------------ アコーディオン ------------*/ (function($){ //accordion-product $(function(){ //jqueryオブジェクト保存と効率化 var accordionItem=$('#accordion-product'); //一旦全部消す accordionItem.find('div').hide(); //active要素を指定して開く var no=0; //click-action accordionItem.find('h3').click(function () { //active切り替え $(this).toggleClass('active'); //表示非表示に時間設定 show hide $(this).next('div').slideToggle('slow'); }); //hover-toggle accordionItem.find('h3').hover(function () { //toggle hoveredクラス $(this).toggleClass('hovered'); }); }); })(jQuery); $(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(); }); }()); });