JQuery1.10.3 - 作者:hemin, 整理yinq
- 核心
jQuery 核心函数
- jQuery([selector,[context]])
- jQuery(html,[ownerDocument])1.8*
- jQuery(callback)
- jQuery.holdReady(hold)1.6+
jQuery 对象访问
- each(callback)
- size()
- length
- selector
- context
- get([index])
- index([selector|element])
数据缓存
- data([key],[value])
- removeData([name|list])1.7*
- jQuery.data(element,[key],[value])1.8-
队列控制
- queue(element,[queueName])
- dequeue([queueName])
- clearQueue([queueName])
插件机制
- jQuery.fn.extend(object)
- jQuery.extend(object)
多库共存
- jQuery.noConflict([extreme])
- 选择器
基本
- #id
- element
- .class
- *
- selector1,selector2,selectorN
层级
- ancestor descendant
- parent > child
- prev + next
- prev ~ siblings
基本
- :first
- :not(selector)
- :even
- :odd
- :eq(index)
- :gt(index)
- :lang(language)1.9+
- :last()
- :lt(index)
- :header
- :animated
- :focus1.6+
- :root1.9+
- :target1.9+
内容
- :contains(text)
- :empty
- :has(selector)
- :parent
可见性
- :hidden
- :visible
属性
- [attribute]
- [attribute=value]
- [attribute!=value]
- [attribute^=value]
- [attribute$=value]
- [attribute*=value]
- [selector1][selector2][selectorN]
子元素
- :first-child
- :first-of-type1.9+
- :last-child
- :last-of-type1.9+
- :nth-child
- :nth-last-child()1.9+
- :nth-last-of-type()1.9+
- :nth-of-type()1.9+
- :only-child
- :only-of-type1.9+
表单
- :input
- :text
- :password
- :radio
- :checkbox
- :submit
- :image
- :reset
- :button
- :file
- :hidden
表单对象属性
- :enabled
- :disabled
- :checked
- :selected
- 属性
属性
- attr(name|properties|key,value|fn)
- removeAttr(name)
- prop(name|properties|key,val|fn)1.6+
- removeProp(name)1.6+
CSS 类
- addClass(class|fn)
- removeClass([class|fn])
- toggleClass(class|fn[,sw])
HTML代码/文本/值
- html([val|fn])
- text([val|fn])
- val([val|fn|arr])
- 筛选
过滤
- eq(index|-index)
- first()
- last()
- hasClass(class)
- filter(expr|obj|ele|fn)
- is(expr|obj|ele|fn)1.6*
- map(callback)
- has(expr|ele)
- not(expr|ele|fn)
- slice(start, [end])
查找
- children([expr])
- closest(expr|object|element)1.7-
- find(expr|obj|ele)1.6*
- next([expr])
- nextAll([expr])
- nextUntil([exp|ele][,fil])1.6*
- offsetParent()
- parent([expr])
- parents([expr])
- parentsUntil([expr|elem][,filter])1.6*
- prev([expr])
- prevAll([expr])
- prevUntil([exp|ele][,fil])1.6*
- siblings([expr])
串联
- add(expr|ele|html|obj[,con])
- andSelf()
- contents()
- end()
- 文档处理
内部插入
- append(content|fn)
- appendTo(content)
- prepend(content)
- prependTo(content)
外部插入
- after(content|fn)
- before(content|fn)
- insertAfter(content)
- insertBefore(content)
包裹
- wrap(html|element|fn)
- unwrap()
- wrapAll(html|ele)
- wrapInner(htm|element|fnl)
替换
- replaceWith(content|fn)
- replaceAll(selector)
删除
- empty()
- remove([expr])
- detach([expr])
复制
- clone([Even[,deepEven]])
- CSS
CSS
- css(name|pro|[,val|fn])1.9*
- jQuery.cssHooks
位置
- offset([coordinates])
- position()
- scrollTop([val])
- scrollLeft([val])
尺寸
- height([val|fn])
- width([val|fn])
- innerHeight()
- innerWidth()
- outerHeight([options])
- outerWidth([options])
- 事件
页面载入
- ready(fn)
事件处理
- on(events,[selector],[data],fn)1.7+
- off(events,[selector],[fn])1.7+
- bind(type,[data],fn)
- one(type,[data],fn)
- trigger(type,[data])
- triggerHandler(type, [data])
- unbind(type,[data|fn]])
事件委派
- live(type, [data], fn)1.7-
- die(type, [fn])1.7-
- delegate(selector,[type],[data],fn)
- undelegate([selector,[type],fn])1.6*
事件切换
- hover([over,]out)
- toggle([speed],[easing],[fn])1.9-
事件
- blur([[data],fn])
- change([[data],fn])
- click([[data],fn])
- dblclick([[data],fn])
- error([[data],fn])
- focus([[data],fn])
- focusin([data],fn)
- focusout([data],fn)
- keydown([[data],fn])
- keypress([[data],fn])
- keyup([[data],fn])
- mousedown([[data],fn])
- mouseenter([[data],fn])
- mouseleave([[data],fn])
- mousemove([[data],fn])
- mouseout([[data],fn])
- mouseover([[data],fn])
- mouseup([[data],fn])
- resize([[data],fn])
- scroll([[data],fn])
- select([[data],fn])
- submit([[data],fn])
- unload([[data],fn])
- 效果
基本
- show([speed,[easing],[fn]])
- hide([speed,[easing],[fn]])
- toggle([speed],[easing],[fn])1.9-
滑动
- slideDown([speed],[easing],[fn])
- slideUp([speed,[easing],[fn]])
- slideToggle([speed],[easing],[fn])
淡入淡出
- fadeIn([speed],[easing],[fn])
- fadeOut([speed],[easing],[fn])
- fadeTo([[spe],opa,[easing],[fn]])
- fadeToggle([speed,[easing],[fn]])
自定义
- animate(par,[speed],[easing],[fn])1.8*
- stop([clearQueue],[jumpToEnd])1.7*
- delay(duration,[queueName])
- finish([queue])1.9+
设置
- jQuery.fx.off
- jQuery.fx.interval
- Ajax
ajax 请求
- jQuery.ajax(url,[settings])
- load(url, [data], [callback])
- jQuery.get(url,[data],[fun],[type])
- jQuery.getJSON(url, [data], [fun])
- jQuery.getScript(url, [callback])
- jQuery.post(url,[data],[fn],[type])
ajax 事件
- ajaxComplete(callback)
- ajaxError(callback)
- ajaxSend(callback)
- ajaxStart(callback)
- ajaxStop(callback)
- ajaxSuccess(callback)
其它
- jQuery.ajaxPrefilter([type] ,fun)
- jQuery.ajaxSetup([options])
- serialize()
- serializeArray()
- 工具
浏览器及特性检测
- jQuery.support
- jQuery.browser1.9-
- jQuery.browser.version
- jQuery.boxModel
数组和对象操作
- jQuery.each(object, [callback])
- jQuery.extend([d],tar,obj1,[objN])
- jQuery.grep(arr, callback, [invert])
- jQuery.sub()1.9-
- jQuery.when(deferreds)
- jQuery.makeArray(obj)
- jQuery.map(arr|obj,callback)1.6*
- jQuery.inArray(val,arr,[froInd])
- jQuery.toArray()
- jQuery.merge(first,second)
- jQuery.unique(array)
- jQuery.parseJSON(json)
- jQuery.parseXML(data)
函数操作
- jQuery.noop
- jQuery.proxy(function,context)
函数操作
- jQuery.contains(con,con)
- jQuery.isArray(obj)
- jQuery.isFunction(obj)
- jQuery.isEmptyObject(obj)
- jQuery.isPlainObject(obj)
- jQuery.isWindow(obj)
- jQuery.isNumeric(value)1.7+
- jQuery.type(obj)
字符串操作
- jQuery.trim(str)
URL
- jQuery.param(obj,[traditional])
插件编写
- jQuery.error(message)
- $.fn.jquery
- 延迟对象
- def.done(donCal[,donCal])
- def.fail(faiCal[,faiCal])
- def.isRejected()1.8-
- def.isResolved()1.8-
- def.reject(args)
- def.rejectWith(context,[args])
- def.resolve(args)
- def.resolveWith(context,[args])
- def.then(donFil[,faiFil] [,proFil])1.7*
- def.promise([type],[target])1.6+
- def.pipe([donFil],[faiFil],[proFil])1.7*
- def.always(alwCal,[alwCal])1.6+
- def.notify(args)1.7+
- def.notifyWith(context,[args])1.7+
- def.progress(proCal)1.7+
- def.state()1.7+
- 回调函数
- callbacks.add(callbacks)1.7+
- callbacks.disable()1.7+
- callbacks.empty()1.7+
- callbacks.fire(arguments)1.7+
- callbacks.fired()1.7+
- callbacks.fireWith([context][,args])1.7+
- callbacks.has(callback)1.7+
- callbacks.lock()1.7+
- callbacks.locked()1.7+
- callbacks.remove(callbacks)1.7+
- jQuery.callbacks(flags)1.7+
- 事件对象
- event.currentTarget
- event.data
- event.delegateTarget1.7+
- event.isDefaultPrevented()
- event.isImmediatePropagationStopped()
- event.isPropagationStopped()
- event.namespace
- event.pageX
- event.pageY
- event.preventDefault()
- event.relatedTarget
- event.result
- event.stopImmediatePropagation()
- event.stopPropagation()
- event.target
- event.timeStamp
- event.type
- event.which