摘要: jQuery.fn是所有jQuery对象的原型对象 1 不要依赖$标识符 2 若插件不反回自己的值,请确保返回jQuery对象以便进行链式调用 3 如果扩展方式有两个以上的参数或配置选项,请允许用户能使用对象的方式传递选项 4 不要污染jQuery命名空间。例如jQuery.fn上定义一个接受函数名 阅读全文
posted @ 2018-08-25 15:10 CodingSherlock 阅读(81) 评论(0) 推荐(0) 编辑
摘要: :animated 匹配在动画中的元素,该动画由jQuery产生 :contains(text) 匹配包含指定文本的元素 :disabled 匹配禁用元素 :empty 匹配没有子节点,没有文本内容的元素 :even 匹配列表中偶数序号的元素 :odd 匹配列表中的奇数序号的元素 :has(sel) 阅读全文
posted @ 2018-08-25 15:09 CodingSherlock 阅读(97) 评论(0) 推荐(0) 编辑
摘要: jQuery.contains() : Check to see if a DOM element is a descendant of another DOM element. 仅仅支持文档元素 Note: The first argument must be a DOM element, not 阅读全文
posted @ 2018-08-25 15:08 CodingSherlock 阅读(116) 评论(0) 推荐(0) 编辑
摘要: load() : Load data from the server and place the returned HTML into the matched element. 如果只想加载文档的一部分,可以在URL后面添加一个空格和一个jQuery选择器 传入String发送GET请求,传入Obj 阅读全文
posted @ 2018-08-25 14:58 CodingSherlock 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 基本概念 jQuery.fx.speeds["medium-fast"]=300;设置自定义时长 jQuery.fx.off 设置动画的开关 jQuery动画是异步的 jQuery动画默认是队列化的 动画方法中的回调函数中this指向当前执行动画的对象 自定义添加缓动函数 jQuery.easing 阅读全文
posted @ 2018-08-25 14:50 CodingSherlock 阅读(92) 评论(0) 推荐(0) 编辑
摘要: click()事件 focus() 和 blur()事件不支持冒泡,focusin和focusout支持 mouseenter和mouseleave不支持冒泡 mouseover和mouseout支持 hover()方法用来给mouseenter和mouseleave事件注册处理程序 hover(h 阅读全文
posted @ 2018-08-25 14:37 CodingSherlock 阅读(148) 评论(0) 推荐(0) 编辑
摘要: .attr&.prop asGet:Get the value of a property/an attribute for the first element in the set of matched elements. asSet:Set one or more properties/attr 阅读全文
posted @ 2018-08-25 14:19 CodingSherlock 阅读(222) 评论(0) 推荐(0) 编辑
摘要: $(target).method(content) $(content).method(target) append() 元素末尾追加 appendTo() prepend() 元素起始处插入 prependTo() after() 元素之后 insertAfter() before() 元素之前 阅读全文
posted @ 2018-08-25 12:34 CodingSherlock 阅读(95) 评论(0) 推荐(0) 编辑
摘要: jQuery全局命名空间中定义的唯一两个变量 jQuery $ $(document).ready(fn);//== 在DOMContentLoaded时触发,浏览器不支持时,会在load时触发 $(fn) jQuery.noConflict();//还原$()为初始值 jQuery对象返回的类数组 阅读全文
posted @ 2018-08-25 11:54 CodingSherlock 阅读(100) 评论(0) 推荐(0) 编辑