 <p><code>natualHeight</code></p> <p>Look veeeeeeery closely at that word... =)</p> <p>It's probably just finding that <code>NaN</code> is neither less than nor greater than nor equal to <code>NaN</code>. (You have the same typo on naturalWidth too)</p>