Created
March 9, 2015 09:05
-
-
Save panych/c46dbc6b48986a6d4f57 to your computer and use it in GitHub Desktop.
Make position: fixed useful for horizontal scrolling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make position 'fixed' useful for horizontal scroll | |
$header = $('.header') | |
$(window).scroll(()-> | |
$header.css('left', "-#{ $(window).scrollLeft() }px") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment