上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: jQuery jQuery分离构造器http://www.imooc.com/code/3398var $$ = ajQuery = function(selector) { this.selector = selector; return this... 阅读全文
posted @ 2016-01-06 10:30 darr 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 如果我们需要同时使用jQuery和其他JavaScript库,我们可以使用 $.noConflict()把$的控制权交给其他库。旧引用的$ 被保存在jQuery的初始化; noConflict() 简单的恢复它们。 通过类似swap交换的概念,先把之前的存在的命名空间给缓存起来,通过对比当前的命名... 阅读全文
posted @ 2016-01-05 19:35 darr 阅读(502) 评论(0) 推荐(0) 编辑
摘要: (function(global, factory) { factory(global);}(typeof window !== "undefined" ? window : this, function(window, noGlobal) { var jQuery = function... 阅读全文
posted @ 2016-01-05 17:59 darr 阅读(133) 评论(0) 推荐(0) 编辑
摘要: https://github.com/JsAaron/jQueryhttps://git.oschina.net/studentzxc/loop-testhttp://www.imooc.com/code/3248jQuery的无new构建原理函数aQuery()内部首先保证了必须是通过new操作符... 阅读全文
posted @ 2015-12-30 17:32 darr 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 一:实例化多个(swipphoto之类的,一个页面多个实例)function index(name){ this.name = name; this.init();//实例化后这个Init自动执行 } index.prototype = { in... 阅读全文
posted @ 2015-12-29 20:02 darr 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 搞一下 阅读全文
posted @ 2015-12-29 18:07 darr 阅读(139) 评论(0) 推荐(0) 编辑
摘要: setTimeout,clicktimerhttp://blog.csdn.net/yanghua_kobe/article/details/6780181场景一:采用函数引用方式的setTimeout调用(和click一样)闭包的一个通常的用法是为一个在某一函数执行前先执行的函数提供参数。例如,在... 阅读全文
posted @ 2015-12-29 15:40 darr 阅读(7098) 评论(0) 推荐(0) 编辑
摘要: 讲真 哪个是节流throttle,哪个是去抖debounce,无所谓啦。。。 硬要区分的话,我觉得是这种: http://blog.peterwf.com/2015/11/17/debounce-throttle/ 参考:https://css-tricks.com/the-difference-b 阅读全文
posted @ 2015-12-28 18:12 darr 阅读(517) 评论(0) 推荐(0) 编辑
摘要: function countDown(){ var self = this; var doWork = function(){ console.log(this);//window console.log(self);//span }; doWork(); }; $(".outer").each(f 阅读全文
posted @ 2015-12-28 16:44 darr 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 浏览器最重要或者说核心的部分是“Rendering Engine”,可大概译为“渲染引擎”,不过我们一般习惯将之称为“浏览器内核”。负责对网页语法的解释(如标准通用标记语言下的一个应用HTML、JavaScript)并渲染(显示)网页。 所以,通常所谓的浏览器内核也就是浏览器所采用的渲染引擎,渲染引... 阅读全文
posted @ 2015-12-27 17:47 darr 阅读(114) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页