title: Jquery window size. change css class with text character limit
body: <p>I have three different responsive: 
  Large Monitor min-width: 1200px
  Small Monitor (min-width: 992px) and (max-width: 1199px)
  Tablet (min-width: 768px) and (max-width: 991px)</p>
  
  <p>I'm trying to use the below code to change character limit for the above three screen sizes. Can someone please let me know what I'm doing wrong here. 
  <a href="http://jsfiddle.net/soulsurfer/5SM9u/30/" rel="nofollow">http://jsfiddle.net/soulsurfer/5SM9u/30/</a></p>
  
  <pre><code>function checkWidth() {
      if ($(window).width() &lt; 1280) {
          $("#limit-char").each(function(i){
          len=$(this).text().length;
             if(len&gt;30)
              {
                $(this).text($(this).text().substr(0,30)+'...');
              }
          })
      } 
  }
  
  $(window).resize(checkWidth);
  </code></pre>