What does the .end() function do in jQuery?

后端 未结 5 1958
星月不相逢
星月不相逢 2020-12-08 04:23

I have already read this web page http://api.jquery.com/end/ but I am still clueless on what .end() actually does. What is it for and how do you use it?

I am also re

5条回答
  •  被撕碎了的回忆
    2020-12-08 04:51

    The following functions can be used to alter your jQuery selection, typically to make your selection more specific, or inclusive/exclusive:

    add, andSelf, children, filter, find, map, next, nextAll, not, parent, parents, prev, prevAll, siblings, slice, clone, appendTo, prependTo, insertBefore, insertAfter, or replaceAll

    .end() can be used to reset your selection back to your original set of elements, after having done some manipulation on the extended selection.

提交回复
热议问题