Select Elements Containing text $(":contains(text)")

$(":contains(text)")

e.g. $("div:contains('abc')")

$(":contains(text)") Select elements that contain the given text.

For example, $("div:contains('abc')") will find <div> elements that contain abc text.

<div>abc</div>
    
<div>abcdef</div>
    
<div>ghi</div>
jQuery selector filter $(":contains(text)")