Fixed overlay when 'author__urls-wrapper button' is not present.

This commit is contained in:
Matthew Aguirre 2016-07-14 10:13:08 -04:00
parent 2a670aaf4d
commit e5147f8de9
2 changed files with 11 additions and 6 deletions

View file

@ -11,7 +11,12 @@ $(document).ready(function(){
$(".sticky").Stickyfill();
var stickySideBar = function(){
if (!$(".author__urls-wrapper button").is(":visible")) {
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();

10
assets/js/main.min.js vendored

File diff suppressed because one or more lines are too long