Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Created January 17, 2013 09:39
Show Gist options
  • Save Chrisedmo/4554853 to your computer and use it in GitHub Desktop.
Save Chrisedmo/4554853 to your computer and use it in GitHub Desktop.
Cool vh fallback - update an elements size based on window height + width.
$(document).ready(
function(){
//resizes div box to perfect window w/h
function sizeMe() {
$('#mySlider').css({height:($(window).height()-150),width:$(window).width()});
};
sizeMe();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment