Skip to content

Instantly share code, notes, and snippets.

@wchaowu
wchaowu / gist:67f94c48cedc92eef198
Created July 25, 2014 05:46
检测页面元素是否进入可视区
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>检测页面元素是否进入可视区</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#testImg{
width:389px;
height:500px;
@wchaowu
wchaowu / create Object 1
Last active August 29, 2015 14:04
对象的创建
//静态创建方式,json对象
/*
var person = {
name: '',
age: '',
eat1 :function (){
}
}*/
@wchaowu
wchaowu / gist:c1698359650b18736c68
Last active August 29, 2015 14:04
函数式编程 lambda表达
var Y = function (f) {
return (function (g) {
return g(g);
}) (function (h) {
return function () {
return f(h(h)) .apply(null, arguments);
};
});
};