jQuery(function (){ // History API�ɑΉ����Ă���ꍇ if (history && history.pushState && history.state !== undefined) { var BbackH = window.innerHeight; console.log('history ok'); // history��lj� history.pushState(null, null, null); if (/iP(hone|od|ad)/.test(navigator.userAgent)) { var osv = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); if(osv[1] <= 9){ HistoryTime(); }else { HistoryShow = true; } }else { HistoryShow = true; } function HistoryTime() { window.onload = function(){ setTimeout(function(){ console.log('histrytime show'); HistoryShow = true; },500); } } window.addEventListener('popstate', function () { if(HistoryShow){ jQuery('body').css({'position':'fixed','width':'100%'}); jQuery('#back').css('min-height',BbackH).show(); jQuery('#back_box,#back_boxx').show().animate({left:'50%',opacity:'1'},500); var agent = navigator.userAgent; if(agent.search(/iPhone/) != -1){ console.log('iphone'); if(window.hogeLib){if(window.hogeLib.countnxios){window.hogeLib.countnxios();} }else {console.log('nonxios');} }else if(agent.search(/iPad/) != -1){ console.log('ipad'); if(window.hogeLib){if(window.hogeLib.countnxios){window.hogeLib.countnxios();} }else {console.log('nonxios');} }else if(agent.search(/Android/) != -1){ console.log('android'); if(window.hogeLib){if(window.hogeLib.countnxand){window.hogeLib.countnxand();} }else {console.log('nonxand');} } } }, false); } }); $(document).ready(function(){ var agent = navigator.userAgent; if(agent.search(/iPhone/) != -1){ $('#hogehoge').css({display : 'none'}); }else if(agent.search(/iPad/) != -1){ $('#hogehoge').css({display : 'block'}); }else if(agent.search(/Android/) != -1){ $('#hogehoge').css({display : 'none'}); } });