编程课程
编程实战
编程题库
编程教程
在线工具
免费 AI IDE
VIP会员
16周年庆
App下载
扫码下载编程狮APP
注册
|
登录
注册成功
X
W3Cschool
恭喜您成为首批注册用户
获得88经验值奖励
马上体验
入门教程
编程课程
VIP会员
jQuery1.8.0帮助文档
赞
收藏
更多文章
目录
搜索
书签
速查表
HTML5速查表
正则表达式速查表
核心
selector
context
jQuery(selector,[context])
get([index])
jQuery(html,[ownerDocument])
index([selector|element])
jQuery(callback)
data([key],[value])
jQuery.holdReady(hold)
jQuery.noConflict([extreme])
removeData([name|list])
each(callback)
jQuery.data(element,[key],[value])
size()
queue(element,[queueName])
length
dequeue([queueName])
clearQueue([queueName])
选择器
#id
element
.class
*
:first
selector1,selector2,selectorN
:last
ancestor descendant
:not(selector)
parent > child
:even
prev + next
:odd
prev ~ siblings
:eq(index)
:gt(index)
:lt(index)
:header
:animated
:focus
[attribute^=value]
:contains(text)
:password
[attribute$=value]
:empty
:radio
[attribute*=value]
:has(selector)
:checkbox
[selector1][selector2][selectorN]
:parent
:submit
:nth-child
:hidden
:image
:first-child
:visible
:reset
:last-child
[attribute]
:button
:only-child
[attribute=value]
:file
:input
[attribute!=value]
:enabled
:text
:disabled
:checked
:selected
CSS
scrollTop([val])
scrollLeft([val])
height([val|fn])
width([val|fn])
innerHeight()
innerWidth()
css(name|pro|[,val|fn])
outerHeight([options])
offset([coordinates])
outerWidth([options])
position()
Ajax
jQuery.ajax(url,[settings])
load(url,[data],[callback])
jQuery.get(url,[data],[callback],[type])
jQuery.ajaxSetup([options])
jQuery.getJSON(url,[data],[callback])
serialize()
jQuery.getScript(url,[callback])
serializeArray()
jQuery.post(url,[data],[callback],[type])
ajaxComplete(callback)
ajaxError(callback)
ajaxSend(callback)
ajaxStart(callback)
ajaxStop(callback)
ajaxSuccess(callback)
工具
jQuery.makeArray(obj)
jQuery.map(array, callback)
jQuery.inArray(val,arr,[from])
jQuery.support
jQuery.toArray()
jQuery.browser
jQuery.sub()
jQuery.browser.version
jQuery.when(deferreds)
jQuery.boxModel
jQuery.merge(first,second)
jQuery.each(object,[callback])
jQuery.unique(array)
jQuery.extend([deep],target,object1,[objectN])
jQuery.parseJSON(json)
jQuery.grep(array,callback,[invert])
jQuery.noop
jQuery.proxy(function,context)
jQuery.param(obj,[traditional])
jQuery.contains(container, contained)
jQuery.error(message)
jQuery.isArray(obj)
jQuery.isFunction(obj)
jQuery.isEmptyObject(obj)
jQuery.isPlainObject(obj)
jQuery.isWindow(obj)
jQuery.isNumeric(value)
jQuery.type(obj)
jQuery.trim(str)
筛选
eq(index|-index)
first()
last()
hasClass(class)
filter(expr|obj|ele|fn)
is(expr|obj|ele|fn)
map(callback)
has(expr|ele)
not(expr|ele|fn)
parentsUntil([exp|ele][,fil])
slice(start, [end])
prev([expr])
children([expr])
prevAll([expr])
closest(expr,[con]|obj|ele)
prevUntil([exp|ele][,fil])
find(expr|obj|ele)
siblings([expr])
next([expr])
add(expr|ele|html|obj[,con])
nextAll([expr])
andSelf()
nextUntil([exp|ele][,fil])
contents()
parent([expr])
end()
parents([expr])
事件
ready(fn)
on(events,[selector],[data],fn)
off(events,[selector],[fn])
hover([over,]out)
bind(type,[data],fn)
keypress([[data],fn])
toggle(fn, fn2, [fn3, fn4, ...])
one(type,[data],fn)
keyup([[data],fn])
blur([[data],fn])
trigger(type,[data])
mousedown([[data],fn])
change([[data],fn])
triggerHandler(type,[data])
mouseenter([[data],fn])
click([[data],fn])
unbind(type,[data|fn])
mouseleave([[data],fn])
dblclick([[data],fn])
live(type,[data],fn)
mousemove([[data],fn])
error([[data],fn])
die(type,[fn])
mouseout([[data],fn])
focus([[data],fn])
delegate(sel,[type],[data],fn)
mouseover([[data],fn])
focusout([data],fn)
undelegate([sel,[type],fn])
mouseup([[data],fn])
keydown([[data],fn])
resize([[data],fn])
scroll([[data],fn])
select([[data],fn])
submit([[data],fn])
unload([[data],fn])
属性
addClass(class|fn)
text([val|fn])
removeClass([class|fn])
val([val|fn|arr])
toggleClass(class|fn[,sw])
html([val|fn])
attr(name|pro|key,val|fn)
removeAttr(name)
prop(name|pro|key,val|fn)
removeProp(name)
效果
fadeOut([speed],[easing],[fn])
fadeTo([[speed],opacity,[easing],[fn]])
fadeToggle([speed,[easing],[fn]])
animate(param,[spe],[e],[fn])
show([speed,[easing],[fn]])
stop([cle],[jum])
hide([speed,[easing],[fn]])
delay(duration,[queueName])
slideDown([speed],[easing],[fn])
jQuery.fx.off
slideUp([speed,[easing],[fn]])
jQuery.fx.interval
slideToggle([speed],[easing],[fn])
fadeIn([speed],[easing],[fn])
文档处理
appendTo(content)
prepend(content|fn)
prependTo(content)
after(content|fn)
before(content|fn)
insertAfter(content)
insertBefore(content)
wrap(html|ele|fn)
unwrap()
append(content|fn)
wrapInner(html|ele|fn)
wrapAll(html|ele)
replaceWith(content|fn)
replaceAll(selector)
empty()
remove([expr])
detach([expr])
clone([Even[,deepEven]])
Deferred
def.done(donCal,[donCal])
def.fail(failCal)
def.isRejected()
def.isResolved()
def.reject(args)
def.rejectWith(context,[args])
def.resolve(args)
def.resolveWith(context,args)
def.then(doneCal,failCal)
def.progress([type],[target])
def.pipe([donFil],[faiFil],[proFil])
def.always(alwCal,[alwCal])
def.notify(args)
def.notifyWith(context,[args])
def.state()
Callbacks
callbacks.fire(arguments)
callbacks.fired()
callbacks.fireWith([context][,args])
callbacks.has(callback)
callbacks.lock()
callbacks.locked()
callbacks.remove(callbacks)
callbacks.add(callbacks)
jQuery.callbacks(flags)
callbacks.disable()
callbacks.empty()
关于
关于jQuery API 文档
提交bug及获取更新
搜索
A
A
默认
护眼
夜间
阅读(29.5k)
书签
赞
(
0
)
分享
我要纠错
属性
2018-02-23 16:21 更新
attr(name|pro|key,val|fn)
removeAttr(name)
prop(name|pro|key,val|fn)
removeProp(name)
addClass(class|fn)
removeClass([class|fn])
toggleClass(class|fn[,sw])
html([val|fn])
text([val|fn])
val([val|fn|arr])
以上内容是否对您有帮助:
在文档使用的过程中是否遇到以下问题:
内容错误
更新不及时
链接错误
缺少代码/图片示列
太简单/步骤待完善
其他
更多建议:
提交建议
←
unload([[data],fn])
addClass(class|fn)
→
写笔记
我要补充
精选笔记
在线笔记
App下载
扫描二维码
下载编程狮App
公众号
编程狮公众号
意见反馈
意见反馈
X
意见反馈:
联系方式:
提交
查看完整版笔记
保存
关闭
教程纠错
教程纠错
违规举报
X
广告等垃圾信息
不友善内容
违反法律法规的内容
不宜公开讨论的政治内容
其他
提交
工具
推荐
更多
Trae CN
Turtle绘图
Markdown编辑器
Unix时间戳
Mermaid编辑器
Python在线编译器
在线拾色器
正则工具
AI编程工具
更多
Trae
代码小浣熊
星辰Agent
通义灵码
文心快码
CodeGeeX
GitHub Copilot
Fitten Code
更多建议: