Remove position: sticky
JavaScript polyfill
- Fallback to default positioning for browser that don't support it IE, Chrome < 56, etc. - Issue #752
This commit is contained in:
@ -25,35 +25,7 @@ $(document).ready(function(){
|
||||
// FitVids init
|
||||
$("#main").fitVids();
|
||||
|
||||
// init sticky sidebar
|
||||
$(".sticky").Stickyfill();
|
||||
|
||||
var stickySideBar = function(){
|
||||
var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible");
|
||||
// console.log("has button: " + $(".author__urls-wrapper button").length === 0);
|
||||
// console.log("Window Width: " + windowWidth);
|
||||
// console.log("show: " + show);
|
||||
//old code was if($(window).width() > 1024)
|
||||
if (show) {
|
||||
// fix
|
||||
Stickyfill.rebuild();
|
||||
Stickyfill.init();
|
||||
$(".author__urls").show();
|
||||
} else {
|
||||
// unfix
|
||||
Stickyfill.stop();
|
||||
$(".author__urls").hide();
|
||||
}
|
||||
};
|
||||
|
||||
stickySideBar();
|
||||
|
||||
$(window).resize(function(){
|
||||
stickySideBar();
|
||||
});
|
||||
|
||||
// Follow menu drop down
|
||||
|
||||
$(".author__urls-wrapper button").on("click", function() {
|
||||
$(".author__urls").fadeToggle("fast", function() {});
|
||||
$(".author__urls-wrapper button").toggleClass("open");
|
||||
|
Reference in New Issue
Block a user