title: how do I display the content of <p> in jquery
body: <pre><code>&lt;div class="albumclass"&gt;
    &lt;img width="100" height="100" data-assigned-id="9" src="/Content/images/fold.png"&gt;
    &lt;p&gt;15Sep2015&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The above code is generated dynamically through jQuery. After that I need to display the content of <code>&lt;p&gt;</code> ie., '<code>15Sep2015</code>' by clicking on the above image. How can I get this? I used the below code:</p>
  
  <pre><code>$('.album_inner').on('dblclick', '.albumclass img', function (e) {
    var txt = $(this).closest("p").text();
    alert(txt);
  }
  </code></pre>
  
  <p>But that alerts nothing.It not possible to take content implicitly because a lot of similar div will be there.</p>