/* カスタマイズ用のJavaScriptコードをここに記述してください */ window.addEventListener("pageshow", function(event){ if (event.persisted) { // ここにキャッシュ有効時の処理を書く var path=$(location).attr('pathname'); if (path.slice( -1 )== '/') { window.location.reload(); } } }); function sel_send(form,type){ if(type == 1){ setCond(form); ZdcEmapMakeGPSCondParams(form); } else if (type == 2){ setCond(form); form.filter.value = document.formCond.gpsfilter.value; } else { form.filter.value = document.formCond.gpsfilter.value; } form.submit(); } ///////////////////////// /* スクロール */ ///////////////////////// $(function(){ $("a[href^=#]").not("a.iframe").click(function(){ var Hash = $(this.hash); var HashOffset = $(Hash).offset().top; $($.browser.safari ? "body" : "html").animate({ scrollTop: HashOffset }, 750); return false; }); /* ドロップダウン */ 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"; } }); var flg = "menu-close"; $('.do-drop-on-shop').click(function() { $('.drop-cond-menu-shop').toggle(); if(flg == "menu-close"){ $('.drop-text-shop').text('施設・サービスを選択'); $('.drop-ico-shop').text('ー'); flg = "menu-open"; }else{ $('.drop-text-shop').text('施設・サービスで絞り込む'); $('.drop-ico-shop').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); } } var condListShop = document.getElementById('condListShop').getElementsByTagName('input'); for(var i = 0; i < condListShop.length; i++){ if(condListShop[i].type == 'checkbox' || condListShop[i].type == 'radio'){ if(!condListShop[i].checked){ continue; } var hid = document.createElement("input"); hid.setAttribute("type", "hidden"); hid.setAttribute("name", condListShop[i].id); hid.setAttribute("value", condListShop[i].value); form.appendChild(hid); } } }