Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript position fixed only on scroll X Reply To: position fixed only on scroll X

#277578
Shikkediel
Participant

You could try if this is any smoother (doesn’t require repaints):

$(window).scroll(function() {

  $('#header').css({
    transform: 'translateX(' + $(this).scrollLeft() + 'px)'
  });
});