Question: can jquery selector be a variable?
Answer: How to pass a variable into a jQuery attribute-contains selector? Yes, it is possible to pass a variable into a jQuery attribute-contains selector. The [attribute*=value] selector is used to select each element with a specific attribute and a value containing a string.