set div position to fixed after scrolling 100px?
<p>I tried to use the following function in order to set the div's position to 100 px from top after scrolling 100 px.</p>

<pre><code>&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(window).scroll(function(){
    $("#header").css("top",Math.max(0,100-$(this).scrollTop()));
});
&lt;/script&gt;
&lt;div class="header"  style="position:fixed;top:100px;background-color:red"&gt;something&lt;/div&gt;
</code></pre>

<p>it is not working(the div stick to it's fixed position). it seems that the function is not relating to the div. what is my problem ?</p>
