Script only to run if window is bigger than div
<p>I have the following script that is working great, but I want to wrap it in an if statement that only runs this script when the window height is larger than the #tip element. What do I add?</p>

<pre><code>$(document).scroll(function () {
    if($(window).scrollTop() &gt;= 40){
        $('#tip').css({'position' : 'fixed', 'top' : '20px', 'left' : '50%', 'margin-left' : '250px' });
    }
    if($(window).scrollTop() &lt;= 40){
        $('#tip').css({'position' : 'absolute', 'top' : '15px', 'left' : '', 'margin-left' : ''});
    }
    console.log($(window).scrollTop());
});
</code></pre>
