Created
December 22, 2016 12:27
-
-
Save azharisubroto/954dea70f065d3db287c9aa6f7505aa6 to your computer and use it in GitHub Desktop.
Sticky sidebar "jump" problem
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
// Sticky article aside | |
$(window).on('load', function(){ | |
$('#sidebar').stick_in_parent({ | |
offset_top: 72, | |
parent: '#main', | |
spacer: false | |
}); | |
}); | |
$('#sidebar').on('sticky_kit:bottom', function(e) { | |
$(this).parent().css('position', 'static'); | |
}).on('sticky_kit:unbottom', function(e) { | |
$(this).parent().css('position', 'relative'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment