title: Jquery Find Using Wildcard
body: <p>I need to find the id of a div that starts with chart using wildcard:</p>
  
  <p>So, given the following DOM</p>
  
  <pre><code>&lt;div id="box5" class="box-container"&gt;
      &lt;div class="inner-box wide"&gt;
          &lt;div class="top-box handle"&gt;Some content&lt;/div&gt;
          &lt;div class="chart"&gt;&lt;div id="chart1_div"&gt;A chart&lt;/div&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My guess was.</p>
  
  <pre><code> var $elementToFind = $("[id^=chart]");
   var found = $('div#box5').find($elementToFind).attr('id');
   alert(found);
  </code></pre>
  
  <p>But doesn't seem to work.</p>
  
  <p>Thanks for the help,</p>