title: Match all combinations of any classes in jQuery
body: <p>I have two comma-separated selectors;</p>
  
  <pre><code>.class, .foo, .bar
  
  .lorem, .ipsum, .potato
  </code></pre>
  
  <p>I'd like to be able to select any possible combination between these two groups. So it would select elements matching</p>
  
  <pre><code>.class.lorem
  .class.ipsum
  .class.potato
  .foo.lorem
  .foo.ipsum
  .foo.potato
  .bar.lorem
  .bar.ipsum
  .bar.potato
  </code></pre>
  
  <p>How can I achieve this effectively?</p>