how can i get stackoverflow's overlay that appears at the very top ?
when i scroll up and down, it is very smooth.
how do i do this with jquery ?
how can i get stackoverflow's overlay that appears at the very top ?
when i scroll up and down, it is very smooth.
how do i do this with jquery ?
It's a fixed positioned element.
#foo { position: fixed; top: 0; left: 0; width: 100%; z-index: 2; }
<div id="foo">
<p>This is my fixed element!</p>
</div>
Then you can use cookies to see if the user has visited before and show it with jQuery.
NOTE: The z-index on #foo must be higher than any elements that appear to be sitting on top of it.