. Trim () remove spaces,. Get (), and. Index () to get DOM elements
1 The . Trim () function is used to remove whitespace characters at both ends of a string, with no extra parameter usage
2 Remove all newline characters at the beginning and end of the string, spaces (including contiguous spaces) and tabs (tab), if they are in the middle of the string, they will be preserved and not removed
3. Get () gets the DOM element and finds the corresponding element in the collection through a known index
4 Get gets the DOM object, the object obtained through document.getElementById, the index starting from 0, as found in the second element, can be passed $ (a). Get (1)
5 common syntax. get ([index])
6 The negative index value parameter is a backward index, passing a negative index value, and a negative index starting value of 1, as
The second element is found and can be passed $ (a). Get (-2)
7 . Index () Searches for the index value of a given element from a matching element, counting from 0, parameter accepts a jquery or Dom object as a condition for finding
8 Common syntax
. index () an element of the same level whether it is a homogeneous Li element including a starting from the first child element of the parent element
. Index (selector selector) 2 and 3 are calculated from the element (LI) index 0 to be found, and the other child element indexes (such as a) of the parent element that are not Li are ignored and the index is not evaluated
. Index (element elements)
9 If you do not pass any arguments to the. Index () method, the return value is the position of the first element in the jquery object relative to its sibling element
10 if the. Index () is called on a set of elements, and the parameter is a DOM element or a jquery object, the. Index () return value is the position of the passed-in element relative to the original collection
11 If the parameter is a selector, the. index () return value is the position of the original element relative to the selector match element. If no matching element is found, then. Index () returns-1
jquery animation ——. trim () remove spaces,. Get (), and. Index () to get DOM elements