i have a jquery for the bar following when scroll down/up but it has delay CSS
#rightbar_scroll {position: absolute;top: 0;right: 0;z-index: 10000; }
jQuery(document).ready(function(){
var jQuerysidebar = jQuery("#rightbar_scroll"),
jQuerywindow = jQuery(window),
offset = jQuerysidebar.offset(),
topPadding = 20;
jQuerywindow.scroll(function() {
if (jQuerywindow.scrollTop() > offset.top) {
jQuerysidebar.stop().animate({
marginTop: jQuerywindow.scrollTop() - offset.top + topPadding
});
} else {
jQuerysidebar.stop().animate({
marginTop: 0
});
}
});
});
i want it no delay, how do i add position like the box "Similar Questions" at the right side when ask question in this site?
Thank you, sorry my English not good