title: Finding an element that contains a certain data attribute
body: <p>I have a list like so</p>
  
  <pre><code>&lt;ul id="a"&gt;
  &lt;li data-id="i1" data-pk-type="foo bar"&gt;sdfsf&lt;/li&gt;
  &lt;li data-id="i2" data-pk-type="foo"&gt;sdfs&lt;/li&gt;
  &lt;li data-id="i3" data-pk-type="bar baz"&gt;sfdsf&lt;/li&gt;
  &lt;li data-id="i4" data-pk-type="qux foo"&gt;sfds&lt;/li&gt;
  &lt;li data-id="i5" data-pk-type="baz"&gt;sdff&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want to find all the elements that contain a given <code>data-pk-type</code>. I am trying the following unsuccessful code because <code>.data("pkType", "foo")</code> actually sets the data attribute to <code>foo</code>;</p>
  
  <pre><code>var $links = $("#a").find("li").data("pkType", "foo");
  </code></pre>
  
  <p>I could do something like </p>
  
  <pre><code>var $links = $("#a").find("li", "[data-pk-type='foo']");
  </code></pre>
  
  <p>however that wouldn't work as well… I want any element that might contain <code>foo</code>. Suggestions?</p>