What does this jquery selector do

what does this jquery $("*[regex]") selector do $("*[regex]")

I want to select all controls that have a regex.

+4
source share
1 answer

It selects all elements with the regex= attribute (which it represents, it may be empty).

Although the entire selector may be implied, it may be simple:

 $("[regex]") 

Both are very inefficient, although it would be better to add an element type or anything to narrow it down to attribute searches.

+4
source

All Articles