This file contains 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
/* | |
Copyright (c) Copyright (c) 2010-2011, Christian Johansen | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
This file contains 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
/** | |
* | |
* layout element to center for targettarget | |
* | |
* @param {jQuery} target optional | |
* @param {String} type optional vertical, horizonal, all | |
* @return jQuery Object | |
*/ | |
jQuery.fn.setCenter = function(target, type) { | |
target = target || $(window); |
This file contains 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
<html> | |
<body> | |
<p id="foo"></p> | |
</body> | |
</html> |
This file contains 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
<html> | |
<body> | |
<p><button id="foo">Click</button></p> | |
</body> | |
</html> |
This file contains 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
/** | |
* Custom function can pass arguments(string, number, object, array, function) to a function. | |
*/ | |
/** | |
* 参考サイト | |
* WIZARD-CODE ウィザード・コードのブログ | WIZ-CODE.blog | |
* http://wiz-code.digick.jp/blog/?p=711 | |
*/ | |
function customTimeout() { |
This file contains 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
<html> | |
<head> | |
<style> | |
<link href="smartphone.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 0px) and (max-width: 320px)" /> | |
<link href="tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 321px) and (max-width: 768px)" /> | |
<link href="tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 769px)" /> | |
</head> | |
<body> | |
</body> | |
</tml> |
This file contains 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="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" /> | |
**/ | |
#foo { | |
margin: 0 auto; | |
min-width: 769px; | |
max-width: 980px; | |
} | |
#bar { |
This file contains 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
<h1>Modal Window</h1> | |
<ul style="list-style: none"> | |
<li><a href="images/photo1.jpg" class="modal"><img src="images/photo1_thum.jpg" alt="写真1" /></a></li> | |
<li><a href="images/photo2.jpg" class="modal"><img src="images/photo2_thum.jpg" alt="写真2" /></a></li> | |
<li><a href="images/photo3.jpg" class="modal"><img src="images/photo3_thum.jpg" alt="写真3" /></a></li> | |
</ul> |
This file contains 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
/** | |
* create file | |
*/ | |
function createFile($dir, $file) { | |
$html = <<<HTML | |
<!DOCTYPE HTML>'; | |
<html lang="en">'; | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> |
This file contains 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
/* | |
* カレンダー出力関数 | |
* @param $id 投稿ID | |
* @param $y 年 数字4桁 | |
* @param $m 月 数字1~13 | |
* @param $days 日付 配列 添え字[1~31] 値[空, close, holiday] | |
*/ | |
function drawCalender ($id, $y, $m, $days) { | |
// $y 年 $m 月 | |
$t = mktime(0, 0, 0, $m, 1, $y); //$y年$m月1日のUNIXTIME |