Created
August 24, 2018 20:22
-
-
Save mrtag23/c38846107577a0f98c6b9cc422ed860a to your computer and use it in GitHub Desktop.
Adjusts top offset value depending on drupal toolbar status.
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
// Adjusts top offset depending on additional fixed positioned elements. | |
var windowOffsetAdjust = function() { | |
if ($window.width() < 1200) { | |
if ($body.hasClass('toolbar-vertical')) { | |
return 0; | |
} else { | |
// Adds header height. | |
return 60; | |
} | |
} else { | |
if ($body.hasClass('toolbar-horizontal toolbar-tray-open')) { | |
// Adds toolbar height. | |
return 39; | |
} else if($body.hasClass('toolbar-horizontal')) { | |
// Adds expanded toolbar height. | |
return 79; | |
} else { | |
return 0; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment