title: How to rewrite JS with CoffeeScript
body: <p>I have such code in JS:</p>
  
  <pre><code>$('.slider-for').find('img').each(function(){
    var imgClass = (this.width/this.height &gt; 1) ? 'wide' : 'tall';
    $(this).addClass(imgClass);
  })
  </code></pre>
  
  <p>And need to rewrite it in Coffee. There is what I've got:</p>
  
  <pre><code>$('.slider-cover-photo img').each -&gt;
    imgClass = if $(this).width / $(this).height &gt; 1 then 'wide' else 'tall'
    $(this).addClass imgClass
  </code></pre>
  
  <p><code>this</code> here is a correct  element. But when I try to get its width or height, its value is 0 (<code>$(this).width = 0</code>)</p>