title: Getting value of a particular element within a particular div using jQuery
body: <p>In the markup, i have several divs with same id and inside those divs there are paragraphs and buttons. Now when a button is clicked, i want to get the value of a corresponding paragraph tag under the same div as that particular button. How can i do this with jQuery? The markup is as followed:</p>
  
  <pre><code>&lt;div class="col-sm-5 narrow"&gt;
      &lt;p id="title"&gt;Jhon123&lt;/p&gt;
      &lt;p id="text"&gt;This is the status of jhon&lt;/p&gt;
      &lt;p&gt;posted at 12:30pm GMT6+&lt;/p&gt;
      &lt;form class="form-inline"&gt;
          &lt;input type="text" class="form-control" id="reply" placeholder="Type and enter to reply"&gt;
          &lt;button type="button"  class="btn btn-default" id="repost"&gt;Re-Tweet&lt;/button&gt;
  
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When the button with the id #repost is clicked, i want to access the html inside the p tag with the id #text. I tried something like this:</p>
  
  <pre><code>$('#retweet').click(function(e){
      e.stopPropagation();
      var text = $(this).parent("div").closest('#text');
      alert("some retweet button has been pressed which has the text:"+text);
  });
  </code></pre>