Finding alternate selectors from contains
问题 I have a list of elements obtained through the contains selector. Let's say I want to know how to access a person's name on a profile page. I can test my own profile with my own name. let name = $(':contains(jamie)'); I'd like to store a selector based on the above results that could be used to retrieve the name from any profile. Without walking the DOM and calculating a selector, is there another way to get a (single or list) selector to each element that comes out of the contains query? 回答1