title: using javascript to truncate a paragraph in div to 100 characters
body: <p>I have found the following script to limit / truncate my paragraphs of more than 400 chracters located in a <code>&lt;div&gt;</code> to 200 character.  But i can't figure out how to incorporate it in html!</p>
  
  <p>How is this done?</p>
  
  <p>Following is the script:</p>
  
  <pre><code>&lt;script&gt;
  function ellipsify (str) {
      if (str.length &gt; 10) {
          return (str.substring(0, 10) + "...");
      }
      else {
      return str;
  }
  }
  &lt;/script&gt;
  </code></pre>