Skip to content

Instantly share code, notes, and snippets.

@flexphere
flexphere / index.php
Last active March 30, 2016 10:39
同じ変数を複数の関数で使う
<?php
/***********************************
* メイン部分
*/
//エラーをチェックを行う(エラーがあればメッセージの配列が$error_listに入る
$error_list = error_check();
//$_POSTにデータがあり、エラーがなかった場合には完了ページを読み込む
@flexphere
flexphere / form.php
Last active March 30, 2016 10:39
form.php
<html>
<head>
<title>form</title>
<style>
body {
margin: 60px;
font-size: 90%;
}
hr {
width: 100%;
@flexphere
flexphere / carousel.html
Created April 10, 2016 15:47
dev-carousel
@flexphere
flexphere / gnav1.html
Last active April 19, 2016 14:09
gnav1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
margin: 0;
padding: 0;
}
@flexphere
flexphere / script.js
Last active May 9, 2016 15:13
モジュール化の例
//ankhオブジェクトの作成
var ankh = new Object();
//カルーセル
ankh.carousel = {
_target: '.carousel', //モジュール全体で使うカルーセル化する対象セレクタ
load: function(){
@flexphere
flexphere / script2.js
Last active May 9, 2016 15:38
モジュール化の例2
function scrollMenu(){
//初期設定(position設定など)
var breakpoint = 200,
$(window).resize(onResize);
$(window).scroll(onScroll);
function setBreakpoint(){
//resize時の処理
}
@flexphere
flexphere / compare
Created June 6, 2016 14:53
pjax+php
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Compare</title>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/1.9.6/jquery.pjax.js"></script>
</head>
<body>
<header>
@flexphere
flexphere / bottomposition.jquery.js
Created June 9, 2016 11:10
simple jquery plugin
;(function($, undefined) {
"use strict";
$.fn.bottomPosition = function() {
console.log('offset.top:'+ this.offset().top);
console.log('outerHeight:'+ this.outerHeight());
return this.offset().top + this.outerHeight();
};
})(jQuery);
@flexphere
flexphere / text-masking.html
Last active September 30, 2016 16:26
material-iconsに対するwebkit-background-clipによるテキストクリッピングサンプル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
section {
text-align: center;
}
@flexphere
flexphere / file0.txt
Created June 22, 2018 18:01
chromelessを日本語対応するよ! ref: https://qiita.com/flexphere/items/b896fbc89bb1a36f1e83
$ git clone https://github.com/graphcool/chromeless.git
$ cd chromeless/serverless
$ npm install