In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of jquery how to exclude elements, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will gain something after reading this jquery article on how to exclude elements, let's take a look at it.
In jquery, you can use the not () method to exclude specified elements. The function of this method is to return elements that do not meet certain conditions. Elements that do not meet certain conditions will be returned from the selection, and eligible elements will be excluded. The syntax is "element object .not (criteria,function (index))".
The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.
How does jquery exclude elements
You can use the not () method to exclude elements.
The not () method returns elements that do not meet certain conditions.
This method allows you to specify a condition. Elements that do not meet the criteria are returned from the selection, and elements that meet the criteria are removed.
This method is typically used to remove one or more elements from a combination of selected elements.
Hint: the not () method is relative to the filter () method.
Grammar
$(selector) .not (criteria,function (index))
Criteria is optional. Specifies the selector expression, jQuery object, and one or more elements to be removed from the selected element combination. If you need to specify multiple conditions, separate them with commas.
Function (index) is optional. Specify the function to run for each element in the combination. If true is returned, the element is removed, otherwise the element will be retained. Index-the index position of the element in the collection.
Examples are as follows:
(document) .ready (function () {$("p") .not (".intro") .css ("background-color", "yellow");}); Welcome to my home page
My name is Donald.
I live in Duckburg.
I love Duckburg.
My best friend is Mickey.
Output result:
This is the end of the article on "how to exclude elements in jquery". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to exclude elements from jquery". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.