title: Read more button not working while adding HTML into paragraph in JQuery
body: <p>I am trying to implement read more button with HTML content. When I am adding simple text then it is working fine. I want add HTML inside <code>class="show-read-more"</code>with read more button.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;jQuery Add Read More Link&lt;/title&gt;
  &lt;script src="https://code.jquery.com/jquery-1.12.4.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  var maxLength = 100;
  $(".show-read-more").each(function(){
      var myStr = $(this).text();
      if($.trim(myStr).length &gt; maxLength){
          var newStr = myStr.substring(0, maxLength);
          var removedStr = myStr.substring(maxLength, $.trim(myStr).length);
          $(this).empty().html(newStr);
          $(this).append(' &lt;a href="javascript:void(0);" class="read-more"&gt;read more...&lt;/a&gt;');
          $(this).append('&lt;span class="more-text"&gt;' + removedStr + '&lt;/span&gt;');
       }
       });
       $(".read-more").click(function(){
       $(this).siblings(".more-text").contents().unwrap();
       $(this).remove();
     });
   });
  &lt;/script&gt;
  &lt;style type="text/css"&gt;
  .show-read-more .more-text{
      display: none;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p class="show-read-more"&gt;&lt;h2&gt;What is Lorem Ipsum?&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Lorem Ipsum&lt;/strong&gt; is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industries standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&lt;/p&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>