How to use not in jquery

How to use not in jquery: [not()] method returns elements that do not meet certain conditions, this method is usually used to remove one or more elements from the selected element combination, the syntax is [$(selector).not( criteria,function(index))].



The operating environment of this tutorial: windows7 system, jquery 3.2.1 version, this method is applicable to all brand computers.

Related free learning recommendations: javascript (video), jQuery tutorial (video) How

to use not in jquery:

definition and usage 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 conditions will be returned from the selection, and elements that meet the conditions will be removed.

This method is usually used to remove one or more elements from the selected element combination.

Tip: The not() method is the opposite of the filter() method.

Syntax

1

$(selector).not(criteria,function(index))



instance

returns all those without the class name "intro"

元素:

1

$("p").not(".intro")

Guess you like

Origin blog.csdn.net/hdl17822307857/article/details/112598685