Get each span height and if it's more than 40px change the css
<p>Can anyone help me, I don't understand where the error is.</p>

<p>This is my jQuery:</p>

<pre><code>function altezzadotgrey(){
    $('.views-field-title').each(function(){
        var aaltezzadotgrey = $(this).outerHeight();
        if ($(this).outerHeight() &gt; 40) {
            $(this).css("margin-top", "-45px");
        }
    });
}
</code></pre>

<p>and this is my HTML:</p>

<pre><code>&lt;div class="views-row"&gt;
    &lt;div class="views-field-title"&gt;
        &lt;span class="field-content"&gt;&lt;a href=""&gt;a&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="views-row"&gt;
    &lt;div class="views-field-title"&gt;
        &lt;span class="field-content"&gt;&lt;a href=""&gt;b&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="views-row"&gt;
    &lt;div class="views-field-title"&gt;
        &lt;span class="field-content"&gt;&lt;a href=""&gt;c&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="views-row"&gt;
    &lt;div class="views-field-title"&gt;
        &lt;span class="field-content"&gt;&lt;a href=""&gt;d&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I think there could be a problem with the <code>each()</code>.</p>
