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
function isJquery (obj) { | |
if(obj instanceof jQuery){ | |
return true; | |
} else { | |
return false; | |
} | |
} |
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
<meta name="robots" content="noindex"> |
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 transitionEnds = [ | |
'webkitTransitionEnd', | |
'oTransitionEnd', | |
'otransitionend', | |
'transitionend' | |
]; | |
$('.elm').on(transitionEnds.join(' '), function (e) { | |
// | |
}); |
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
/** | |
* スクリプトとスタイルをキューに入れる | |
*/ | |
function my_scripts() { | |
// 管理画面では読み込まない | |
if ( !is_admin() ) { | |
// スタイルシートディレクトリーを取得する。この方法だと子テーマでもそのまま使える | |
$dir = get_stylesheet_directory_uri(); |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
function getMax (array) { | |
return Math.max.apply(null, array); | |
} |
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
<script src="../../common/js/jquery-2.1.1.js"></script> | |
<script> | |
// 新しいバージョンのjQueryを変数に格納 | |
var $2_1_1 = $.noConflict(); | |
</script> | |
<script src="../../common/js/jquery-1.11.1.js"></script> | |
<script> | |
alert($2_1_1.fn.jquery); // 2.1.1 | |
alert($.fn.jquery); // 1.11.1 | |
</script> |
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
alert($.fn.jquery); |