I have all the code of a fixed sidebar that works perfectly, however I want as soon as the scroll bar reaches the top of the page, the top itself, an element receives a CSS assignment through .css ().
Something in this line:
$(window).scroll(function() {
if ($(window).scrollTop() == 0) {
$('#top-tabv2').css({'margin-top': '-1px'});
}
});
How can I proceed? Right now, grateful! =]