The example in this article describes the usage of the not selector in jQuery. Share it with everyone for your reference. The specific analysis is as follows:
This selector removes elements from a collection of elements that match the given selector.
Grammar structure:
Parameter list:
Example code:
Example 1:
Script House welcomes you
The above code can set the font color in the li element collection whose class attribute value is not second to green.
Example 2:
Script House welcomes you
Since the above code does not specify a selector to be used with the :not selector, it is used with the * selector by default. Since the color attribute is inherited, the text of all elements will be set to green.
Readers who are interested in more content related to jquery selector can check out the special topic of this site: "Summary of jquery selector usage"
I hope this article will be helpful to everyone’s jQuery programming.