記号 | 意味 |
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample | |
$.ajax({ | |
type: 'GET', | |
url: hogeURL, | |
cache: false, | |
timeout: 10000 // 10秒でタイムアウト | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@supports (display: flex) { | |
.flexbox { | |
display: flex; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( isMobileDevice()) { | |
var redirect_url = "http://example.com/sp/index.html" + location.search; | |
if (document.referrer) { | |
var referrer = "referrer=" + encodeURIComponent(document.referrer); | |
redirect_url = redirect_url + (location.search ? '&' : '?') + referrer; | |
} | |
location.href = redirect_url; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ga('create', 'UA-0123456-1'); | |
// ここから | |
if (location.search.indexOf('referrer=') >= 0) { | |
var params = location.search.replace('?', '').split('&'); | |
for (var i = 0; i < params.length; i++) { | |
var kv = params[i].split('='); | |
if (kv.length == 2 && kv[0] == 'referrer') { | |
ga('set', 'referrer', decodeURIComponent(kv[1])); | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/((|,)([0-9]{1,3})+)+円/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// このコードはjQueryを仕様しています。 | |
if(window.history && window.history.pushState) { | |
var stateName = 'samePage'; | |
history.pushState(stateName, null, null); | |
$(window).on('popstate', function (e) { | |
if (history.state === stateName) { | |
alert(history.state); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iOSversion = function () { | |
if (/iP(hone|od|ad)/.test(navigator.platform)) { | |
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); | |
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; | |
} | |
}; |