//リンク全体タップ化 $(function(){ $(".clickAllRangeFunction").click(function(){ window.location=$(this).find("a").attr("href"); return false; }); //////////////////////////////////////////////////////////////////////////// //検討中 //202002 $(".js-mykeeplist-action").on("click", function(){ var store_seq = $(this).attr('id').split('_')[1]; var initID = '#js-mykeeplist-shop_'+store_seq; if ($(initID+' button').attr('disabled') == 'disabled'){ return false; } //console.log(store_seq); //console.log(initID); $.ajax({ type : "POST", dataType: "json", url : "/api/ajax/mykeeplistadd", async : true, cache : false, data :{ store_seq: store_seq } }).done(function(data) { console.log(data); //alert(data); if(data.result == true){ $(initID+' button .js-mykeeplist-btntext').html('検討中追加済み'); $(initID).addClass('is-disabled'); $(initID+' button').attr('onmousedown',''); $(initID+' button').attr('disabled','disabled'); $(initID).parents('.js-mykeeplist').find('.mykeeplist-popup-added').fadeIn(1000); $(initID).parents('.js-mykeeplist').find('.mykeeplist-popup-added').delay(2000); $(initID).parents('.js-mykeeplist').find('.mykeeplist-popup-added').fadeOut(1000); if(data.count > 0) { $('.js-mykeeplist-header').find('.count').removeClass('cnt-noDisp'); }else{ $('.js-mykeeplist-header').find('.count').addClass('cnt-noDisp'); } $('.js-mykeeplist-header .count').html(data.count); $(initID).parents('.js-mykeeplist').find('.mykeeplist-popup-added').css('display', 'block'); }else{ //alert(data.mess); console.log(data.mess); } }).fail(function(XMLHttpRequest, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); }); }); //////////////////////////////////////////////////////////////////////////// //検討中の削除 //202002 $(".js-mykeeplistdel-action").on("click", function(){ var store_seq = $(this).attr('id').split('_')[1]; var initID = '#js-mykeeplistdel-shop_'+store_seq; var store_name = $(initID+' input').val(); //console.log(store_seq); //console.log(store_name); var confirm_result = window.confirm('下記の求人をリストから削除しますか?\n\n'+store_name); if(confirm_result) { console.log('実行!!'); $.ajax({ type : "POST", dataType: "json", url : "/api/ajax/mykeeplistdelete", async : true, cache : false, data :{ store_seq: store_seq } }).done(function(data) { console.log(data); $(initID).parents('.js-mykeeplistdel').remove(); if(data.count > 0) { $('.js-mykeeplist-header').find('.count').removeClass('cnt-noDisp'); }else{ $('.js-mykeeplist-header').find('.count').addClass('cnt-noDisp'); } $('.js-mykeeplist-header .count').html(data.count); $('.js-mykeeplistdel-count').html(data.count); }).fail(function(XMLHttpRequest, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); }); } }); }); //ヘッダスクロール可変 $(document).ready(function() { var windowRoll = $(window), topBtn = $('.fixedHeader'), showFlug = false, changeBottom = $('body').height() - windowRoll.height(); topBtn.css('top', '0px'); topBtn.css('left', '0px'); windowRoll.scroll(function () { if ($(this).scrollTop() > 30) { if (showFlug == false) { showFlug = true; topBtn.stop().animate({'top' : '-17px'}, 100); } $('.fixedHeader .topCaption').css("display", "none"); $('.fixedHeader').css("opacity", "1"); topBtn.addClass("fixedHeaderbottomsmall").removeClass("fixedHeaderbottomlage"); } else { if (showFlug) { showFlug = false; topBtn.stop().animate({'top' : '0px'}, 100); } $('.fixedHeader .topCaption').css("display", "block"); $('.fixedHeader').css("opacity", "1"); topBtn.addClass("fixedHeaderbottomlage").removeClass("fixedHeaderbottomsmall"); } }); }); //検討中リストの件数更新 202002 $(document).ready(function() { var cookies = document.cookie.split(';'); var current_val = ''; var current_keeplist = []; var my_count = 0; for (i = 0; i < cookies.length; i++) { var keep = cookies[i].split("="); if(keep[0].trim().match(/mykeeplist/)){ current_val = keep[1]; break; } } console.log(current_val); if(current_val != ''){ current_keeplist = current_val.split('__'); my_count = current_keeplist.length; } if(my_count>0){ $('.js-mykeeplist-header').find('.count').removeClass('cnt-noDisp'); }else{ //$('.js-mykeeplist-header').find('.count').addClass('cnt-noDisp'); } $('.js-mykeeplist-header .count').html(my_count); //console.log(my_count); }); //ヘッダ高さ取得変更 $(document).ready(function() { var fixedHeaderHeight = $(".fixedHeader").height(); $(".mainContents").css("margin-top", fixedHeaderHeight); }); //チェックボックス-全てチェックするボタン $(document).ready(function() { $('.checkAll').on('change', function() { $('.' + this.id).prop('checked', this.checked); }); }); //グレーキャプショントグル用 $(document).ready(function() { $(".GlayCaption_BTN,.searchAdditionalCondition").on("click", function() { $(this).next().toggle(); $(this).toggleClass("GlayCaptionactive"); }); }); //お店動画エリアTOP用 $(document).ready(function() { var windowWidth = (window.innerWidth||document.documentElement.clientWidth||0); var windowHeight = (window.innerHeight||document.documentElement.clientHeight||0); $(".videoItemToggleBTN").on("click", function() { var videoitem = $(this).next().find('.js_vid_item').get(0); videoitem.play(); $(this).next().css("display","block"); $(".videoItemArea_pcmode .videoItemToggle video").css("left",windowWidth / 2 - 320); $(".videoItemArea_pcmode .videoItemToggle video").css("top",windowHeight / 2 - 240); }); }); $(document).ready(function() { $(".videoItemToggleBG").on("click", function() { var videoitem = $(this).prev().find('.js_vid_item').get(0); videoitem.pause(); videoitem.currentTime = 0; $(".videoItemToggle").css("display","none"); }); }); // var d18gaVrvideoid = ""; function d18ga(vrvideoid,gaEventName,gaEventAction,gaEventLabel) { if (d18gaVrvideoid.indexOf(vrvideoid) == -1) { d18gaVrvideoid += vrvideoid+' '; //alert("CLICK:"+vrvideoid+" "+gaEventName+" "+gaEventAction+" "+gaEventLabel); ga('send', 'event', gaEventName, gaEventAction, gaEventLabel); } } //glisse画像表示用 $(document).ready(function() { $('.glissepics').glisse({ changeSpeed: 300, speed: 100, effect:'fade', fullscreen: false }); }); //TOP戻るボタン $(document).ready(function() { $('.page-topbtn').click(function () { $('body,html').animate({ scrollTop: 0 }, 400); return false; }); });