title: How to auto break line when content is too long in Jquery?
body: <p>There is some text comprised of 200 characters. I need to show only the first 100 characters and 100 another characters should show new line. How to implement it using jquery?</p>
  
  <pre><code>&lt;div&gt;
  &lt;p id="msg"&gt;The content (length &gt; 200)&lt;/p&gt;
  &lt;/div&gt;
  
  
  
  
  
  &lt;script type="text/javascript"&gt;
                                  $(function () {
                                      var txt = $('#msg').text();
                                      for (i = 0; i &lt; txt.length; i = i+20) {
                                          $('#msg').text(txt.substring(i,i+20) + '\n');
                                      }
                                  })
                  &lt;/script&gt;
  </code></pre>