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
function addClass (elem, classes) { | |
var c = elem.className; | |
elem.className = c? c + ' ' + classes: classes; | |
} |
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
あのイーハトーヴォのすきとおった風、<br> | |
夏でも底に冷たさをもつ青いそら、<br> | |
うつくしい森で飾られたモリーオ市、<br> | |
郊外のぎらぎらひかる草の波。<br> | |
祇辻飴葛蛸鯖鰯噌庖箸 |
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
// Moved to https://github.com/terkel/jquery-print-link-urls |
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
div { | |
border: 1px solid red; | |
*border-style: none; | |
} | |
div table { | |
border-style: hidden; | |
*border: 1px solid red; | |
} | |
div table th, | |
div table td { |
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
// http://twitter.com/padolsey/status/119790781417537536 | |
$.expr[':'].matches = (function (_) { | |
return function (el, i ,m) { | |
return !!_(m[3]||'*',[el])[0]; | |
}; | |
}($.find.matches)); |
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
// http://gihyo.jp/dev/serial/01/crossbrowser-javascript/0007 | |
var addEvent = (function () { | |
if (document.addEventListener) { | |
return function(node, type, handler) { | |
node.addEventListener(type, handler, false); | |
}; | |
} else if (document.attachEvent) { | |
return function(node, type, handler) { | |
node.attachEvent('on' + type, function (event) { | |
handler.call(node, event); |
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
/* http://hail2u.net/blog/webdesign/centering-floated-list.html */ | |
.centered { | |
position: relative; | |
overflow: hidden; | |
} | |
.centered ul { | |
position: relative; | |
left: 50%; | |
float: left; | |
} |
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
// Including IE detection by James Padolsey: https://gist.github.com/527683 | |
(function (html) { | |
var ie = (function () { | |
var undef, | |
v = 3, | |
div = document.createElement('div'), | |
all = div.getElementsByTagName('i'); | |
while (div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', all[0]); | |
return (v > 4)? v: undef; | |
}()); |
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
// http://www.culture27.com/blog/2011/12/font-family | |
$gothic: "Hiragino Kaku Gothic ProN", "Meiryo", "MS PGothic"; | |
$mincho: "Hiragino Mincho ProN", "MS PMincho"; |
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
// http://html5.org/r/6884 | |
/^[a-zA-Z0-9.!#$%&'*+-/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/ |