title: Getting value of ID from class using jQuery?
body: <p>How would you retrieve the value of the ID tag using its class name in jQuery.</p>
  
  <p>I am trying the following code but it returns value <code>undefined</code>.</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;textarea id='5' class='cp _check'&gt;sometexthere&lt;/textarea&gt;
      &lt;/body&gt;
  &lt;html&gt;
  </code></pre>
  
  <p>And calling it using the following function:</p>
  
  <pre><code>function updatecontent() {
      var check = $('.cp _check').('#id').val();
      alert(check);
  }
  </code></pre>
  
  <p>The <code>alert</code> box returns value as <code>undefined</code>.</p>