jQuery 学习列表

jQuery   学习列表

 

1、

Events

Page Load

$. ready ( fn() )
Specify a function to execute when the DOM is fully loaded.

 

2、

Selectors

Basics

#id
Selects a single element with the given id attribute.
element
Selects all elements with the given tag name.
.class, .class.class
Selects all elements with the given class.
*
Selects all elements.
selector1, selector2
Selects the combined results of all the specified selectors.

 

3、

Attributes

Attributes

str. attr ( name ) | (name , value ) ) 1.6*
Get the value of an attribute for the first element in the set of matched elements.
$. attr ( name, val ), . attr ( map ), . attr ( name, fn(index, attr) )
Set one or more attributes for the set of matched elements.
$. removeAttr ( name )
Remove an attribute from each element in the set of matched elements.
$. prop ( name ) 1.6+
Get the value of a property for the first element in the set of matched elements.
$. removeProp ( name ) 1.6+
Remove a property for the set of matched elements.

 

 4、

Traversing

Filtering

$. eq ( index )
Reduce the set of matched elements to the one at the specified index.
$. first ( )
Reduce the set of matched elements to the first in the set.
$. last ( )
Reduce the set of matched elements to the final one in the set.
$. has ( selector ), . has ( element )
Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
$. filter ( selector ), . filter ( fn(index) )
Reduce the set of matched elements to those that match the selector or pass the function's test.
bool. is ( selector | function(index) | jQuery object | element ) 1.6*
Check the current matched set of elements against a selector and return true if at least one of these elements matches the selector.
$. map ( fn(index, element) )
Pass each element in the current matched set through a function, producing a new jQuery object containing the return values..
$. not ( selector ), . not ( elements ), . not ( fn( index ) )
Remove elements from the set of matched elements.
$. slice ( start [, end] )
Reduce the set of matched elements to a subset specified by a range of indices.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值