轉自 http://api.jquery.com/category/traversing/filtering/

jquery有很多過濾器可以用! 

不常用都忘了, 記錄一下....

--

Filtering

  • .eq()

    Reduce the set of matched elements to the one at the specified index.

  • .filter()

    Reduce the set of matched elements to those that match the selector or pass the function's test.

  • .first()

    Reduce the set of matched elements to the first in the set.

  • .has()

    Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

  • .is()

    Check the current matched set of elements against a selector, element, or jQuery object and returntrue if at least one of these elements matches the given arguments.

  • .last()

    Reduce the set of matched elements to the final one in the set.

  • .map()

    Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

  • .not()

    Remove elements from the set of matched elements.

  • .slice()

    Reduce the set of matched elements to a subset specified by a range of indices.

--

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()