Is there a fast, reliable way to convert a space-separated class list like:
classOne classTwo classThree
to a selector like:
$('.classOne .classTwo .classThree')
I'm thinking it could done with either a loop that builds a selector string, or a series of regular expressions (one to clean up extra spaces and a second to convert [space]
to [space].
), but I'd like to know if there’s a built-in way, or something more concise/efficient/clever.