title: jquery: Make divs large or small depending on text length
body: <p>I want to develop a stable webpage that adapts well to all screen sizes including mobile devices. My idea is to create a script that would check the length of text in a div. If it contains:</p>
  
  <ul>
  <li>few or equals than 20 words, make the div small</li>
  <li>between 21 and 500 words make the div normal </li>
  <li>and more than 500 words maxe the div big.</li>
  </ul>
  
  <p>I also want to use a toggle to hide content but for the moment it would be okay. I am using isotope to stack divs vertically. And am loading texts from a mysql database query.
  I want the articles that are low in content which could be links or youtube videos to show in smaller boxes while normal and big articles gets displayed big enough to avoid seeing scrollbars or not before it reaches an understandable maximum size. I'll have to find a way to deal with it without unbalancing the site's shape.</p>
  
  <p>Can someone tell me what I have to do? </p>