Skip to content

Instantly share code, notes, and snippets.

@alpual
Created March 2, 2018 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alpual/b130d395f787e33571f3b943c0e4fb9a to your computer and use it in GitHub Desktop.
Save alpual/b130d395f787e33571f3b943c0e4fb9a to your computer and use it in GitHub Desktop.
var fixHeaderSizes = function(query){
var $vh = $(query);
var theheight = $vh.height();
var inlineCss = $vh.attr('style');
$fancyHeader.attr('style', "height: " + theheight + "px !important; " + inlineCss );
}
setTimeout(function(){
fixHeaderSizes("#exampleWithVH"); // for example
fixHeaderSizes(".secondExampleQueryWithVH"); // for example
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment