I'm having a difficult time getting a selector to work properly. I have a class name stored in a variable, which I would usually select like:
$("." + class_name)
When I do this, however, I'm getting the error: Syntax error, unrecognized expression: .
as if it's not recognizing the class selector.
Almost every other example of how to select classes based on variables uses this method as well, am I missing something really basic here? Thanks for your help.
class_nameconsole.log("." + class_name)before the selectorclass_namehas a empty string value