title: jQuery - select divs with IDs that contain a certain string AND are part of a certain class
body: <p>New to JS and jQuery, designing a game as an exercise.</p>
  
  <p>I'm trying to select divs whose IDs contain a certain string AND have a certain class.</p>
  
  <p>I know how to select a class:</p>
  
  <pre><code>$(".myClass")
  </code></pre>
  
  <p>and I know how to select for IDs that include a certain string:</p>
  
  <pre><code>$("[id*=" + certainString + "]")
  </code></pre>
  
  <p>But I do not know how to combine the two to get this:</p>
  
  <pre><code>$( elements of class ".myClass" that also have id that contains certainString)
  </code></pre>