The has() is an inbuilt method in jQuery which is used to find all the elements inside the specified list of elements.
Parameter: It accepts a parameter expression or an element to match elements against them.
Return Value: It returns all elements that match the specified selector having one or more elements inside them.
All the “p” elements containing the “span” elements get highlighted.
- jQuery | :has() Selector with example
- Check if a jquery has been loaded or not
- How to check an element has certain CSS style using jQuery ?
- How to find which DOM element has the focus using jQuery?
- jQuery callbacks.has() Method
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.fx.off Property
- jQuery | jQuery.support Property
- jQuery | jquery Property
- jQuery | prepend() with Examples
- jQuery | dblclick() with Examples
- jQuery | offset() with Examples
- jQuery | children() with Examples
- jQuery | Hide/Show, Toggle and Fading methods with Examples
- jQuery | focusin() with Examples
- jQuery | Animation, Slide methods with Examples
- jQuery | change() with Examples
- jQuery | filter() with Examples
- jQuery | height() and innerHeight() with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.