jQuery Stick header on scroll
<p>I have made a rediculasly small snippet to make a sub-header stick to the top.
But since , Like I said - I am by no means a js genious or jQuery genious - and actually far from it - I have my doubts about my own coding abilities..</p>

<ul>
<li>the demo is here : <a href="http://jsfiddle.net/obmerk99/VvKq3/1/" rel="nofollow">http://jsfiddle.net/obmerk99/VvKq3/1/</a></li>
</ul>

<p>The questions :</p>

<ul>
<li>1 - there seems to be a lot of plugins (and a lot of questions also
in this very site) with much more code than my snippet - what am i
missing ?? What am I doing wrong ?</li>
<li>2 - will this work cross-browser ?</li>
<li>3 .. and this is a small problem, how to avoid the small "jump" that occurs ?
(if you go to the fiddle, and scroll <strong>slowly</strong> - you will see that the main div "jumps" when the script is evoked ..
I have tried to add another .pad class to the lower divs - </li>
</ul>

<p>added class : <code>.pad</code> when script evoked. </p>

<blockquote>
  <p>.pad{padding-top:42px;}</p>
</blockquote>

<p>but it does not seems to work right : <a href="http://jsfiddle.net/obmerk99/VvKq3/2/" rel="nofollow">http://jsfiddle.net/obmerk99/VvKq3/2/</a></p>

<ul>
<li>5 .How can I calculate the real position of the div ? when I try
something like this :</li>
</ul>

<blockquote>
<pre><code>var top = jQuery(window).scrollTop();

var div_top =  jQuery('#header_stick').offset().top;

if (top &gt; div_top) // height of float header;
</code></pre>
</blockquote>

<p>it is jumpy ... <a href="http://jsfiddle.net/obmerk99/VvKq3/4/" rel="nofollow">http://jsfiddle.net/obmerk99/VvKq3/4/</a></p>

<ul>
<li>6 any other suggestions are welcome..</li>
</ul>
