Skip to content

Instantly share code, notes, and snippets.

@yamitake
yamitake / gist:3077814
Created July 9, 2012 17:40
jquery.cssproperties.js
/**
jquery.cssproperties.js ver1.0
The MIT License
Copyright (c) since 2012 Yapr! inc. jun takeno
http://www.facebook.com/yamitake
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
var board = [
["l","h","i","k","o","a","v"],
["r","q","s","c","z","l","p"],
["u","w","a","l","n","f","o"],
["t","y","k","a","j","e","h"],
["a","h","i","t","s","y","d"],
["e","f","o","p","t","x","n"],
["r","u","z","w","y","v","e"]
];
@yamitake
yamitake / gist:3012225
Created June 28, 2012 16:12
lessquelton prototype
var result = {};
function dive(elem , arr){
if(!arr)arr = {};
arr[elem.get(0).tagName.toLowerCase()] = {}
elem.children().each(function(){
dive($(this) , arr[elem.get(0).tagName.toLowerCase()]);
});
@yamitake
yamitake / gist:3001311
Created June 27, 2012 04:04
css3propetylist
animation
animation-delay
animation-direction
animation-duration
animation-fill-mode
animation-iteration-count
animation-name
animation-play-state
animation-timing-function
appearance
@yamitake
yamitake / gist:2992689
Created June 26, 2012 01:55
htmlの要素からlessのスケルトンを作成
var result = "";
var depth = 0;
function dive(elem){
result += indent(depth) + (elem.get(0).tagName.toLowerCase() + "{\n");
//idが会ったら
var id = elem.get(0).id;
if(id){
console.log("id aru");
@yamitake
yamitake / mixin-border-images
Created June 25, 2012 09:26
less border-images mixin
.border-images(@image) {
-webkit-border-image: @image;
-moz-border-image: @image;
-ms-border-image: @image;
-o-border-image: @image;
border-image: @image;
}
@yamitake
yamitake / gist:2642172
Created May 9, 2012 05:39
ボクガチャロジック
var a = Math.random();
if(a < 0.3){
console.log("atari");
}else{
console.log("hazure");
}
@yamitake
yamitake / 失敗
Created April 30, 2012 07:39
テキストを長そうとしたけ
var opts = {};
opts.delayTime = 2000;
opts.delayTime = 30;
//text を流す
var ticker = function(selector , text){
var target = $(selector);
var len = text.length;
var str = text;
var i = 0;
@yamitake
yamitake / gist:2348044
Created April 10, 2012 02:44
jklkljlkj
[linkref]: リンクのアドレス "リンクのタイトル"
@yamitake
yamitake / placeholder.replace.value
Created March 23, 2012 04:06
placeholderの値でvalueを上書き
$("input:text , textarea").each(function(){
$(this).val($(this).attr("placeholder"));
});