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:
Michael Rose
2017-01-05 11:48:37 -05:00
parent 88933c4e08
commit 55843c5dca
10 changed files with 11 additions and 88 deletions

View File

@ -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");