Skip to content

Instantly share code, notes, and snippets.

@solodxg
solodxg / tabChange.js
Created December 26, 2012 11:34
js:tab切换
Function.prototype.getCallback = function(){
var _this = this, args = arguments;
return function(e) {
return _this.apply(this || window, args);
};
}
function $(i) {
return document.getElementById(i)
}
@solodxg
solodxg / reset.css
Created December 25, 2012 09:36
css:reset-min
/* === reset === */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, form, blockquote {
margin: 0;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
ol, ul {
padding: 0;
list-style: none outside none;
@solodxg
solodxg / constellation.js
Created December 18, 2012 03:21
js:生日转换为星座
/**
/* 生日转换为星座
/* @param mon 月份
/* @param day 日份(1-31)
/* @return string 对应日期生日的星座字符串
**/
function constellation(mon, day) {
var s = "魔羯水瓶双鱼牡羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";