title: Using jQuery, how can I select elements by multiple data-attributes?
body: <p>Consider this array of <code>p</code> tags indexed by data attributes.</p>
  
  <pre><code>&lt;p class='my-class' data-id='0' data-id-index='1'&gt;&lt;/p&gt;
  &lt;p class='my-class' data-id='0' data-id-index='2'&gt;&lt;/p&gt;
  &lt;p class='my-class' data-id='1' data-id-index='1'&gt;&lt;/p&gt;
  &lt;p class='my-class' data-id='1' data-id-index='2'&gt;&lt;/p&gt;
  </code></pre>
  
  <p>To select a <code>p</code> by <code>data-id</code> and append text I can use:</p>
  
  <pre><code>$('.my-class[data-id="' + dataId + '"]').append(myText);
  </code></pre>
  
  <p>The above will append <code>myText</code> to all <code>p</code> tags with the same <code>data-id</code>. But what about if I wanted to select by both <code>data-id</code> and <code>data-id-index</code>? </p>